I made a script to show a GUI when touched.
function loadscreen(hit) if not hit.PlayerGui:FindFirstChild("Gui") then local gui = script.Gui:clone() gui.Parent = hit.PlayerGui end end script.Parent.Touched:connect(loadscreen)
However, the outputs shows the message seen in the title and it fails to work. Help?
The error message isn't lying! :P
When whatever is being connected to the Touched event is touched, the variable 'hit' will (almost?) always be a Part. Parts don't usually contain PlayerGuis, Player objects do. Somehow you need to find the Player object from that 'hit' part. Good luck!