I have this script, its meant to detect if the localplayer touches it and does something if they do.
local player = game.Players.LocalPlayer
script.Parent.Touched:connect(function (hit)
if hit.Parent == player then
player.StarterGui.examplegui:Destroy()
end
end)
however it does nothing, please help as in a rush to complete the script!
