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

Im trying to change the avatar however its not working?

Asked by 2 years ago

It puts it into the player however is in the workspace and doesnt move with me?

local player = game.Players.LocalPlayer
local player1 = game.Workspace:FindFirstChild(player.Name)
local debounce = false
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.R then
        print(player1.Name)
        if debounce == false then
            debounce = true
        game.Workspace.sounds.Banana:Play()
        local body = game.ReplicatedStorage.PowerParts.BananaBod:Clone()
            body.Parent = player1
            player1.Humanoid.WalkSpeed = 30
        wait(10)
        game.Workspace.sounds.Banana:Stop()
            player1.Humanoid.WalkSpeed = 22
        body:Destroy()
            debounce = false
        end
    end
    end)

Answer this question