Disabling scripts not working

So I made this one ice shard tool that when you throw on the ground you’re gonna freeze and every humanoid in a 10 studs radius for 10 seconds. If its a player then it will disable the runScript and toolScript in him so he can’t run (changing the speed from 0 back to 25) or throw and attack (duh he’s frozen).

Problem is it don’t work. The local scripts keep running even tho they’re disabled so I can run and use tools.

Idk I tried changing from enabled to disabled : didn’t work. Every other topics were people having problem with Enabled or Disabled or other parts of their code.

I’ll only put a part of my code, if you want more reply and tell me.

for i, v in pairs(players) do	-- Go through the table
			v.Humanoid.WalkSpeed = 0	-- Put its child walk speed to 0
			v.Humanoid.JumpPower = 0	-- Put is childs jump power to 0
			
			if game.Players:FindFirstChild(v.Name) then		-- Disable the player from running and using tools
				game.Players:FindFirstChild(v.Name).PlayerGui.ScreenGui.RunScript.Disabled = true
				game.Players:FindFirstChild(v.Name).PlayerGui.ScreenGui.ToolScript.Disabled = true
			end
		end
		
		sound:Play()					-- Play the freezing sound
		wait(10)						-- Wait ten seconds
		
		for i, v in pairs(players) do	-- Go through the table again
			v.Humanoid.WalkSpeed = 16	-- Put its child walk speed back to 16
			v.Humanoid.JumpPower = 45	-- Put is childs jump power back to 45
			
			if game.Players:FindFirstChild(v.Name) then		-- Enable the player from running and using tools
				game.Players:FindFirstChild(v.Name).PlayerGui.ScreenGui.RunScript.Disabled = false
				game.Players:FindFirstChild(v.Name).PlayerGui.ScreenGui.ToolScript.Disabled = false
			end
		end

Also here is a video so you understand more :

Plz help.

A solution could be creating attributes that you can place onto the player like “Frozen”,

And then in your tool (assuming it’s a localscript), fire a remote event to the server to handle the logic of confirming and setting the affected player’s frozen attribute to true?

--Client
freezePlayers:FireServer()

---Server
local function HandleFreezing(sourcePlayer : Player)
-- Sanity checks (handle determining if players are near the ice shard only on server for security against exploiters).
--let's say the sanity check passed
affectedPlayer:SetAttribute("Frozen", true)
end

freezePlayers.OnServerEvent:Connect(HandleFreezing)

and then in respective player’s run scripts/toolscripts, check for the frozen attribute’s condition:

if LocalPlayer:GetAttribute("Frozen") then print("player is frozen, can't run!") return end

If the ice shard tool is a local script, you’ll need to use Remote Events and let the server know that a player is trying to freeze other players, and handle that logic on the server. Client-sided code does not replicate to other players.

Don’t forget to use a heartbeat on that so it runs constant.

@1billybob1 Oh yea forgot to tell ya its a server script inside the tool, not a local script. So no event plz. (to detect event i need to create another script, I want that to be only in an emergency scenario cuz u know im lazy).

I just want to know why script disabled not working and how to fix dat