When a player steps on a point, that point turns to the team. Color and name. Now it works sometimes. But sometimes it gives me an error:
It works at first for a few people, but then it breaks…
Code:
point1.Touch.Touched:Connect(function(hit)
if not debounce1 then
debounce1 = true
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid ~= nil then
local player = Players:GetPlayerFromCharacter(hit.Parent)
if player.Team ~= nil then
if player.Team == Teams.British then
-- Code
elseif player.Team == Teams.French then
-- Code
end
end
end
wait(1)
debounce1 = false
end
end)