DoorFront.Touched:Connect(function(hit)
if debounce == false then
debounce = true
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player.TeamColor == "Lapis" then
print("lapis")
end
end)
I get this warning: Workspace.TestDoor.Script:13: attempt to index nil with ‘TeamColor’
(Also, please ignore how i’m missing a few ends because for some reason I can’t indent), in the actual script it’s there.
if player.TeamColor == BrickColor.new('Lapis') then
print('lapis')
end
So then your full script would be
DoorFront.Touched:Connect(function(hit)
if debounce == false then
debounce = true
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player.TeamColor == BrickColor.new("Lapis") then
print("lapis")
end
end -- You were missing an end here
end)