Hello, i have problem with this script. Enemy team player should die when he touch owner door in another team. I mean in script it says that it will kill every player, which are not in my team. Anyway it's owner door script to tycoon.
v = script.Parent.Parent.Value click = script.Parent.ClickDetector function wat(player) local character = game.Players:GetPlayerFromCharacter(player.Parent) if player.TeamColor == script.Parent.Parent.Parent.Parent.TeamColor.Value then if v.Value == true then v.Value = false script.Parent.BrickColor = BrickColor.new("Bright red") for i,v in pairs(script.Parent.Parent.Lasers:GetChildren()) do v.BrickColor = BrickColor.new("Bright green") v.Transparency = .8 v.CanCollide = false end elseif v.Value == false then v.Value = true script.Parent.BrickColor = BrickColor.new("Bright green") for i,v in pairs(script.Parent.Parent.Lasers:GetChildren()) do v.BrickColor = BrickColor.new("Bright red") v.Transparency = .3 v.CanCollide = true if player.Parent:FindFirstChild("Torso") then local exp = Instance.new("Explosion") exp.BlastRadius = 3 exp.Position = player.Position exp.Parent = workspace print("added explosion") if player.Parent:FindFirstChild("Humanoid") then player.Parent.Humanoid.Health = 0 print("killed") end end end end end end click.MouseClick:connect(wat)
Closed as Not Constructive by Goulstem
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?