Okay, so I have a wall that only allows certain teams to enter. I want the script to pop a message if the other team goes and touches the wall. The killing of the the other team works, and the transparency and everything works, but the message does not. Can someone help me with this? I only want the message going to that one person who was trying to go through that door/wall
Thanks here is what i have!
Door = script.Parent
------------------------------------
modelname="Taxi Driver"
------------------------------------
function onTouched(hit)
print("Door Hit")
local human = hit.Parent:FindFirstChild("Humanoid")
local message = Instance.new("Message")
message.Parent = game.Players:playerFromCharacter(hit.Parent)
if (human ~= nil ) then
if game.Players:playerFromCharacter(hit.Parent).TeamColor==game.Teams:findFirstChild(modelname).TeamColor then
Door.Transparency = 1
wait(1)
Door.CanCollide = false
Door.Transparency = 1
else
human.Health = 0
message.Text = "Player was not a Taxi Driver"
wait(5)
message:Remove ()
end
end
end
connection = Door.Touched:connect(onTouched)
local debounce = false

1 comment
Sublime tabbing there mate.