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

Why wont this make it so that only the angel button does the spawn?

Asked by 9 years ago
if script.Parent.Parent.Parent.TeamColor == BrickColor.new('Really red') then
    script.Parent.Angel.TextTransparency = 1
    script.Parent.Angel.BackgroundTransparency = 1
    script.Parent.Angel.Active = false
    script.Parent.Heavon.TextTransparency = 1
    script.Parent.Heavon.BackgroundTransparency = 1
    script.Parent.Heavon.Active = false
elseif script.Parent.Parent.Parent.TeamColor == BrickColor.new('New Yeller') then
    script.Parent.Demon.TextTransparency = 1
    script.Parent.Demon.BackgroundTransparency = 1
    script.Parent.Demon.Active = false
    script.Parent.Hell.TextTransparency = 1
    script.Parent.Hell.BackgroundTransparency = 1
    script.Parent.Hell.Active = false
end
script.Parent.Angel.MouseButton1Down:connect(function()
    angelspawning = true
    script.Parent.Angel.TextTransparency = 1
    script.Parent.Angel.BackgroundTransparency = 1
    script.Parent.Angel.Active = false
    player = script.Parent.Parent.Parent
    angspawn = Workspace.AngSpawn
    beam = Instance.new('Part', Workspace)
    beam.BrickColor = BrickColor.new('New Yeller')
    beam.CanCollide = false
    beam.Anchored = true
    beam.CFrame = angspawn.CFrame *CFrame.new(0,100,0)
    beammesh = Instance.new('CylinderMesh', beam)
    beam.Size = Vector3.new(1,300,1)
    beam.Transparency = .5
    for open = 1, 5 do
        beam.Size = beam.Size +Vector3.new(1,0,1)
        wait(.02)
    end
    player.Character.Torso.CFrame = angspawn.CFrame *CFrame.new(0,125,0)
    player.Character.Torso.Anchored = true
    for float = 1, 230 do
        wait(.02)
        player.Character.Torso.CFrame = player.Character.Torso.CFrame *CFrame.new(0,-.5,0)
    end
    player.Character.Torso.Anchored = false
    wait(1)
    beam:remove()
    angelspawning = false
end)

i have tried diff things but the 2 buttons wont turn inviso and they stay active but yet in the properties it says both are inactive... the event will even fire for the other button...

Answer this question