Alright, this script works sort of, but it doesnt generate a message into the playergui after elseif. Does anyone know why? script:
script.Parent.MouseClick:connect(function(open)
if script.Parent.Parent.Parent.door.Transparency == 0 and script.Parent.Parent.CanCollide == true then
script.Parent.Parent.Parent.door.Transparency = 1
script.Parent.Parent.Parent.door.CanCollide = false
wait(5)
script.Parent.Parent.Parent.door.CanCollide = true
script.Parent.Parent.Parent.door.Transparency = 0
elseif script.Parent.Parent.Transparency == 1 and script.Parent.Parent.CanCollide == false then
m = Instance.new("Message", open.PlayerGui)
m.Name = "Pm"
m.Text = "This door is already open."
wait(3)
m:Destroy()
end
end)
script > ClickDetector > door ^ Thats whats in workspace.

2 comments
umm if I change this into a local script and use local player, will that work?
It has nothing to do with localscripts. You gotta use the FindFirstChild(PLAYERSNAME), and so on.