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

I was making a team changing script for some animation testing, but it doesnt work?

Asked by 7 years ago

So I wanted to make an overwatch animation testing thingy, but my team change script won't change the animations.

Here is the code:

local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
    local redgear = game.ReplicatedStorage:WaitForChild("PaintballGun")
    if plr.Backpack:FindFirstChild('GravityCoil') or plr.StarterGear:FindFirstChild('GravityCoil') or game.Workspace[plr.Name]:FindFirstChild('GravityCoil') then
    if  plr.Backpack:FindFirstChild('GravityCoil') then
        plr.Backpack:FindFirstChild('GravityCoil'):Destroy()
    end
    if  plr.StarterGear:FindFirstChild('GravityCoil') then
        plr.StarterGear:FindFirstChild('GravityCoil'):Destroy()
    end

if  game.Workspace[plr.Name]:FindFirstChild('GravityCoil') then
        game.Workspace[plr.Name]:FindFirstChild('GravityCoil'):Destroy()
end
    end
    redgear:Clone().Parent = plr.Backpack
    redgear:Clone().Parent = plr.StarterGear
    plr.TeamColor = BrickColor.new('Gold')
    game.Workspace[plr.Name].Head:Destroy()
    plr.Animate.Disabled = true
    local ZenAnimate = game.ReplicatedStorage.ZenAnima:Clone()
    ZenAnimate.Parent = game.Workspace[plr.Name]
end)

what is wrong?

Basically i took an old team script i had and did this btw

Answer this question