I have no idea how to script, so can you help me?
COMMUNITY QUESTION
How do you make a team only door that has something to do with the team name?
1 answer
Seems you need a Touched event.
local Door = workspace.Door -- define the door
local debounce = false -- make sure to have a debounce
Players = game:GetService('Players') - we'll be needing this service
Door.Touched:Connect(function(otherPart)
local Player = Players:GetPlayerFromCharacter(otherpart.Parent)
if Player then
if Player.Team == game.Teams['TeamNameHere'] and debounce == false then -- check team and debounce
debounce = true
Door.Transparency =.5
Door.CanCollide = false
wait(.5) -- how long before the door goes back to normal
Door.Transparency = 0
Door.CanCollide = true
debounce = false
end
end
end)
Make sure to properly define the door to make sure this works.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
'Scripting Helpers is not a request site! Your post will be removed if it does not comply with our rules. Please see this help article for more information.' Please report this by clicking 'Moderation' and don't answer.