Idea To make a player re equip the specified "Rifle" every time they unequipped the "Rifle"
Problem The Script Only works in studios, any ideas? :D
Code
toolBin = script.Parent plr = game.Players.LocalPlayer char = plr.Character while true do if toolBin:findFirstChild("Rifle") then toolBin:findFirstChild("Rifle").Parent = char end wait() end
THANKS :D
If the issue is latency, as mentioned by devSeldom, I would recommend doing the following:
toolBin = script.Parent plr = game.Players.LocalPlayer char = plr.Character or plr.CharacterAdded:wait() while wait() do if toolBin:findFirstChild("Rifle") then toolBin:findFirstChild("Rifle").Parent = char end end
Why?
Due to the character sometimes being created before the scripts run, in Roblox Studio, plr.CharacterAdded:wait()
sometimes permanently yields the script, which can be a real pain when testing.