Hey guys, I'm trying to make this script to where if you have a ForceField and if you were on a specific team, you would be teleported back to your team's safety room. But if you didn't have a ForceField, you'd die. Here's the script:
char = script.Parent.Parent.Parent.Parent.Parent
char_plyr = char.Character
char_team = char.TeamColor
script.Parent.MouseButton1Down:connect(function()
char_team = char.TeamColor
ff = char_plyr:findFirstChild("ForceField")
if char_team == "Bright blue" and ff then
ff:remove()
char_plyr.Torso.CFrame = CFrame.new(-62, 5, 150)
elseif char_team == "Bright red" and ff then
ff:remove()
char_plyr.Torso.CFrame = CFrame.new(-32, 5, 150)
else
char_plyr.Humanoid.Health = 0
end
end)
I really need to find out what the heck the issue is, because I've been trying to find out for hours.
Thanks,
-Mister Zaoku |