Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't this script to remove control not doing anything( no errors)?

Asked by 6 years ago

script.Parent.Touched:Connect(function(Hit) if Hit.Parent:FindFirstChild("Humanoid") then local Name = game.Players:GetPlayerFromCharacter(Hit.Parent) local Backup =Name:WaitForChild("PlayerScripts").ControlScript:Clone() Name.PlayerScripts.ControlScript:Destroy() print("NICE") wait(2) Backup.Parent =Name.PlayerScripts wait(5) end end)

this script is a normal script inside of the player's humanoid. it is supposed to diable others for 2 seconds and only allow disables to be done every 5 seconds whenever the player touches another player's humanoid.

Why wont it workk?

0
I even tested with a server, no errors User#17125 0 — 6y
1
Put the script into the player's Torso or HumanoidRootPart. The Humanoid is not a physical part, so it will not collide with anything. TheDeadlyPanther 2460 — 6y
0
Also, the server literally can't access PlayerScripts ingame. You need to use localscripts, or find another way cabbler 1942 — 6y

Answer this question