This script works in the client, but not in a server. It used to work, I don't know why it's not working.
local tool = script.Parent
local plr = game.Players.LocalPlayer
local gui1 = game.ReplicatedStorage.ControlsGui
local controlsGui1 = plr.PlayerGui:FindFirstChild("ControlsGui")
tool.Equipped:connect(function()
tool.rMovement.Disabled=true
tool.lMovement.Disabled=true
local plr=game.Players:findFirstChild(tool.Parent.Name)
if plr and tool.Parent:findFirstChild("Humanoid") and not controlsGui1 then
controlsGui1=gui1:Clone()
controlsGui1.Parent=plr.PlayerGui --this is the error it says..
end
controlsGui1:WaitForChild('TextButton').Visible = true
if tool.HandValue.Value==1 then
tool.lMovement.Disabled=false
else tool.rMovement.Disabled=false
end
end)
Client Log Says This:
