This script is having some issues. I am creating a OnClick GUI giver. The last part doesn't seem to work
gui = script.Parent connector = Workspace.GUI button = script.Parent.Giver Tool = game.Lighting.BrownBessV1 print("Killer's Musket Giver V1 is active!") function OnC() wait() print("Connecting...") if connector.Value == 1 then print("Value is 1!") gui.Visible = true else print("Value is 0!") gui.Visible = false end end function Give(Plr) Tool1 = Tool:clone() Tool1.Parent = Plr.Backpack end connector.Changed:connect(OnC) button.MouseButton1Click:connect(Give)
That is the whole script. This part doesn't seem to work
function Give(Plr) Tool1 = Tool:clone() Tool1.Parent = Plr.Backpack end connector.Changed:connect(OnC) button.MouseButton1Click:connect(Give)
I get this error:
15:29:48.174 - Players.Player1.PlayerGui.Move.Frame.Script:21: attempt to index local 'Plr' (a nil value) 15:29:48.175 - Stack Begin 15:29:48.176 - Script 'Players.Player1.PlayerGui.Move.Frame.Script', Line 21 15:29:48.176 - Stack End
u didnt define the plr, I don't think it's connected with MouseButton1Click()