Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Team door doesnt kill?

Yo i got this team door script when i touch it i don't die and i want the door to kill how to do it ?

Door = script.Parent 
------------------------------------
modelname="Desert Military Team"
------------------------------------
 
function onTouched(hit) 
        print("Door Hit") 
        local human = hit.Parent:FindFirstChild("Humanoid") 
        if (human ~= nil ) then
                if game.Players:playerFromCharacter(hit.Parent).TeamColor==game.Teams:findFirstChild(modelname).TeamColor then
                        Door.CanCollide = false
                        Door.Transparency = 0.5             
                        wait(2) 
                        Door.CanCollide = true 
                        Door.Transparency = 0
                        print("Human touched door")

                end
 
        end 
end 
 
connection = Door.Touched:connect(onTouched)

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.