Hello. I made a cup part, when it is clicked it should give the player who clicked it a tool. That isn't happening though. The output gives no error either.
Here is the script:
game.Players.LocalPlayer:WaitForChild('Backpack') function onClicked(plr) if plr:GetRankInGroup(3983801) >= 2 then local sc1 = game.ServerStorage.Tools.Cups.WhiteCups.SmallEmptyCup:Clone() sc1.Parent = game.Players.LocalPlayer.Backpack sc1.Name = ('Small Empty Cup') end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Help would be appreciated.
Thanks
Nevermind, I fixed it by changing it to a regular script. Thanks anyway.