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'

1 comment
Thanks