How do you scale an objects z and x to a variable.

I have a radius variable that i want to set a cylinder to specifically the x and the z. how do i change the scale of it? This is Enemy Ai code btw

Heres my current code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BetterEnemyAI : MonoBehaviour
    public GameObject player;
    public float speed = 4;
    public float radius = 5;
    public GameObject Physicalradius;

    void Update()
        Physicalradius.transform.localScale.x = radius;
        Physicalradius.transform.localScale.y = radius;
        if (Vector3.Distance(transform.position, player.transform.position) <= radius)
            transform.Translate(Vector3.forward * speed * Time.deltaTime);

You can’t edit individual fields of the localScale, you have to set it in 1 go.

		Vector3 rad = Physicalradius.transform.localScale;
		rad.x = radius;
		rad.z = radius;
		Physicalradius.transform.localScale = rad;