Hello guys, I have a Team name: "Alpin doctor" and this name have a space between the two words and then the script don`t work. (The scripts open a door when a player in the team touch it)
If I let a space between the words the second line have a problem.
I tested also this: game.Teams.['Alpine doctor'] and this game.Teams.('Alpine doctor') and alos this game.Teams.["Alpine doctor"] and this game.Teams.'Alpine doctor'
Here is the script:
local team = game.Teams.Alpine doctor
local door = script.Parent
door.Touched:connect(function(hit)
Here is the full script
ocal team = game.Teams.Alpine doctor
local door = game.Workspace.STOPP.medicdoor
door.Touched:connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.Team == team then
door.CanCollide = false
door.Transparency = .5
wait(1)
door.CanCollide = true
door.Transparency = 0
else
humanoid.Health = 0
end
end
end)
Thanks for any help in previous

1 comment
Thanks, I did not think of that. Thanks you a lot.