Whenever i attempt to use the WaitForChild event, it doesnt work and i have zero clue why
local ui = game.Players.LocalPlayer:WaitForChild("PlayerGui").ScreenGui
script.Parent.Touched:Connect(function()
wait()
ui.Enabled = true
end)
script.Parent.TouchEnded:Connect(function()
wait()
ui.Enabled = false
end)
The errors goes like so: Workspace.Part.ShopOpen:1: attempt to index nil with 'WaitForChild'