Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

group door script is killing everyone?

Asked by
lomo0987 250 Moderation Voter
10 years ago

When you touch the door, you die. The group you get VIP for is http://www.roblox.com/My/Groups.aspx?gid=1089722 Is there anything wrong with the 7th line?

debounce = false

script.Parent.Touched:connect(function(hit)
    if (hit) then
        if (hit.Parent) then
            if (game.Players:GetPlayerFromCharacter(hit.Parent)) then
                if (game.Players:GetPlayerFromCharacter(hit.Parent):IsInGroup(184188)) then
                    debounce = true
                    script.Parent.Transparency = 0.5
                    script.Parent.CanCollide = false
                    wait(2)
                    script.Parent.Transparency = 0
                    script.Parent.CanCollide = true
                    debounce = false
                else 
                    hit.Parent.Humanoid.Health = 0
                end
            end
        end
    end
end)

Answer this question