So I have a script located on a image button that is on a frame and that frame in a screen gui but the script throws me an error (Read Below)
Script:
local plr = game.Players.LocalPlayer local kat = plr:WaitForChild("EquippedKat") local button = script.Parent button.MouseButton1Click:Connect(function() kat.Value = button.Name end)
Error:
19:35:41.450 - Players.0Papa_Rat0.PlayerGui.Shop.Grid.Classic.Script:3: attempt to index nil with 'WaitForChild'
You are using a Server-Script!
You have to use a LocalScript
for that cuz you cant get theLocalPlayer
with a server script!
I hope that helped you :D
Hi 0Papa_Rat0,
Go here to find out more about LocalScripts.
Thanks,
Best regards,
IdealistDeveloper,