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

My 'Fornite Dancing' script only works in Studio, but not in the game. How do I fix this?

Asked by 5 years ago

I have made a script that allows people to 'Fortnite Dance' in the game. Sadly, the dances work only in studio, and the game pass scripts don't work. Nothing is showing up in output. The script is a local script.

player = game.Players.LocalPlayer

animationdab = script.Parent.Background.Dab:WaitForChild("Animation")
animationdd = script.Parent.Background.DefDance:WaitForChild("Animation")
animationfloss = script.Parent.Background.Floss:WaitForChild("Animation")
animationhype = script.Parent.Background.Hype:WaitForChild("Animation")
animationinfdab = script.Parent.Background.InfDab:WaitForChild("Animation")
animationOJ = script.Parent.Background.OJ:WaitForChild("Animation")
animationtakel = script.Parent.Background.TakeL:WaitForChild("Animation")
animationworm = script.Parent.Background.Worm:WaitForChild("Animation")

DabButton = script.Parent.Background.Dab
DefaultButton = script.Parent.Background.DefDance
FlossButton = script.Parent.Background.Floss
HypeButton = script.Parent.Background.Hype
InfDabButton = script.Parent.Background.InfDab
OJButton = script.Parent.Background.OJ
TakeLButton = script.Parent.Background.TakeL
WormButton = script.Parent.Background.Worm
OpenButton = script.Parent.DancesOpen
BackButton = script.Parent.Background.Back
Background = script.Parent.Background

enableddab = true
enableddefault = true
enabledfloss = true
enabledhype = true
enabledinfdab = true
enabledoj = true
enabledtakel = true
enabledworm = true

--[[
    Animation Times:

    Dab: 0.9
    Default: 4.5
    Floss: 3.2
    Hype: 3.5
    Infinite Dab: 1.8
    Orange Justice: 6.2
    Take the L: 1.4
    Worm: 2
--]]

OpenButton.Activated:Connect(function()
    if Background.Visible == true then
        Background.Visible = false
    else
        Background.Visible = true
    end
end)



BackButton.Activated:Connect(function()
    Background.Visible = false
end)

--[[

--]]

-- Dab -- 

DabButton.Activated:Connect(function()
    if enableddab then
        enableddab = false

        local animationtrack1 = player.Character.Humanoid:LoadAnimation(animationdab)
        animationtrack1:Play()

        wait(0.9)
        enableddab = true
        animationtrack1:Stop()
    end
end)

-- Default -- 

DefaultButton.Activated:Connect(function()
    if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 6501778) then
        if enableddefault then
            enableddefault = false

            local animationtrack2 = player.Character.Humanoid:LoadAnimation(animationdd)
            animationtrack2:Play()

            wait(4.5)
            enableddefault = true
            animationtrack2:Stop()
        else
            DefaultButton.TextLabel.Text = "You don't own the pass!"
            wait(3)
            DefaultButton.TextLabel.Text = "Default Dance ????"
        end
    end 
end)

-- Floss -- 

FlossButton.Activated:Connect(function()
    if enabledfloss then
        enabledfloss = false

        local animationtrack3 = player.Character.Humanoid:LoadAnimation(animationfloss)
        animationtrack3:Play()

        wait(3.2)
        enabledfloss = true
        animationtrack3:Stop()
    end
end)

-- Hype -- 

HypeButton.Activated:Connect(function()
    if enabledhype then
        enabledhype = false

        local animationtrack4 = player.Character.Humanoid:LoadAnimation(animationhype)
        animationtrack4:Play()

        wait(3.5)
        enabledhype = true
        animationtrack4:Stop()
    end
end)

-- Infinite Dab --

InfDabButton.Activated:Connect(function()
    if enabledinfdab then
        enabledinfdab = false

        local animationtrack5 = player.Character.Humanoid:LoadAnimation(animationinfdab)
        animationtrack5:Play()

        wait(1.8)
        enabledinfdab = true
        animationtrack5:Stop()
    end
end)

-- Orange Justice --

OJButton.Activated:Connect(function()
    if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player, 6501781) then
        if enabledoj then
            enabledoj = false

            local animationtrack6 = player.Character.Humanoid:LoadAnimation(animationOJ)
            animationtrack6:Play()

            wait(6.2)
            enabledoj = true
            animationtrack6:Stop()
        else
            OJButton.TextLabel.Text = "You don't own the pass!"
            wait(3)
            OJButton.TextLabel.Text = "Orange Justice ????"
        end
    end 
end)

-- Take the L -- 

TakeLButton.Activated:Connect(function()
    if enabledtakel then
        enabledtakel = false

        local animationtrack7 = player.Character.Humanoid:LoadAnimation(animationtakel)
        animationtrack7:Play()

        wait(1.4)

        enabledtakel = true
        animationtrack7:Stop()
    end
end)

-- Worm -- 

WormButton.Activated:Connect(function()
    if enabledworm then
        enabledworm = false

        local animationtrack8 = player.Character.Humanoid:LoadAnimation(animationworm)
        animationtrack8:Play()

        wait(2)

        enabledworm = true
        animationtrack8:Stop()
    end
end)
0
The simple solution is making ur script FE -_-6 DEVLogos 8 — 5y

Answer this question