script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player.TeamColor == "Bright blue" then
print("blue")
end
end)
Why doesn't this script work?
script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player.TeamColor == "Bright blue" then
print("blue")
end
end)
Why doesn't this script work?
script.Parent.Touched:connect(function(hit)
local player = game.Players:FindFirstChild(hit.Parent.Name) -- I just use this.. I find it to be easier :D
if player.TeamColor == "Bright blue" then
print("blue")
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.