Before

game:GetService("ReplicatedStorage").Arrow.OnServerEvent:Connect(function(player)
    if player.Data.Stand.Value == 9 or player.Data.Stand.Value == 91 or player.Data.Stand.Value == 92 or player.Data.Stand.Value == 93 or player.Data.Stand.Value == 94 or player.Data.Stand.Value == 95 or player.Data.Stand.Value == 10006 then
    local char = player.Character
    if not char:FindFirstChild"Artist Hat" then
    return
    end
    local human = char["Humanoid"]
    local location = player.Character.HumanoidRootPart.CFrame
    player:LoadCharacter()
    human.WalkSpeed = 16
    human.JumpPower = 50
    player.Character.HumanoidRootPart.CFrame = location
        local rando = math.random(1, 5)
        if rando == 1 then
            local randooooo = math.random(0, 100)
            if randooooo >= 2 then
            player.Data.Stand.Value = 94
            end
        elseif rando == 2 then
            local randoo = math.random(0, 100)
            if randoo >= 2 then
            player.Data.Stand.Value = 93
            elseif randoo <= 1 then
            player.Data.Stand.Value = 95
            end
        elseif rando == 3 then
            local randooo = math.random (0, 100)
            if randooo >= 2 then
                player.Data.Stand.Value = 93
            elseif randooo <= 1 then
                player.Data.Stand.Value = 95
            end
        elseif rando == 4 then
            player.Data.Stand.Value = 92
        elseif rando == 5 then
            player.Data.Stand.Value = 91
        end
    end
    if rand > 10 and rand then
        local rando = math.random(1, 5)
        if rando == 1 then
            player.Data.Stand.Value = 95
        elseif rando == 2 then
            player.Data.Stand.Value = 94
        elseif rando == 3 then
            local randoooo = math.random (0, 100)
            if randoooo >= 2 then
                player.Data.Stand.Value = 93
            elseif randoooo <= 1 then
                player.Data.Stand.Value = 95
            end
            player.Data.Stand.Value = 93
        elseif rando == 4 then
            player.Data.Stand.Value = 92
        elseif rando == 5 then
            player.Data.Stand.Value = 91
        end
    end
    end
end)

After

game:GetService("ReplicatedStorage").Arrow.OnServerEvent:Connect(function(player)
    if player.Data.Stand.Value == 9 or player.Data.Stand.Value == 91 or player.Data.Stand.Value == 92 or player.Data.Stand.Value == 93 or player.Data.Stand.Value == 94 or player.Data.Stand.Value == 95 or player.Data.Stand.Value == 10006 then
    local char = player.Character
    if not char:FindFirstChild"Artist Hat" then
    return
    end
    local human = char["Humanoid"]
    local location = player.Character.HumanoidRootPart.CFrame
    player:LoadCharacter()
    human.WalkSpeed = 16
    human.JumpPower = 50
    player.Character.HumanoidRootPart.CFrame = location
        local rando = math.random(1, 5)
        if rando == 1 then
            local randooooo = math.random(0, 100)
            if randooooo >= 2 then
            player.Data.Stand.Value = 94
            end
        elseif rando == 2 then
            local randoo = math.random(0, 100)
            if randoo >= 2 then
            player.Data.Stand.Value = 93
            elseif randoo <= 1 then
            player.Data.Stand.Value = 95
            end
        elseif rando == 3 then
            local randooo = math.random (0, 100)
            if randooo >= 2 then
                player.Data.Stand.Value = 93
            elseif randooo <= 1 then
                player.Data.Stand.Value = 95
            end
        elseif rando == 4 then
            player.Data.Stand.Value = 92
        elseif rando == 5 then
            player.Data.Stand.Value = 91
        end
    end
    if rand > 10 and rand then
        local rando = math.random(1, 5)
        if rando == 1 then
            player.Data.Stand.Value = 95
        elseif rando == 2 then
            player.Data.Stand.Value = 94
        elseif rando == 3 then
            local randoooo = math.random (0, 100)
            if randoooo >= 2 then
                player.Data.Stand.Value = 93
            elseif randoooo <= 1 then
                player.Data.Stand.Value = 95
            end
            player.Data.Stand.Value = 93
        elseif rando == 4 then
            player.Data.Stand.Value = 92
        elseif rando == 5 then
            player.Data.Stand.Value = 91
        end
    end
end)

7 comments

0

What exactly is the problem, could you please specify?

0

I take the item, use it, the animation from another script plays. But nothing else happens, I'm sure that the problem is in this script since it is responsible for changing the value.

0

First, not getting an answer and asking a duplicate question so quickly is not allowed here, second, if you do want help, explain your problem: What exactly did you change? What is it supposed to do? What is it doing?

0

This is a script that changes the value of the stand with different probability. To get the stand, you need to use the tool, first Rolox Studio gave me an error, I tried to fix it, so 2 block codes are attached to the question. After I fixed the error, it disappeared, but nothing happened when using the tool.

0

I see the blocks of code, I'm asking you to show, in your question: Where the error was, what the error was, and how you fixed it. I cannot help you if you keep on being vague with your details.

0

In the first code I got an error: 0 ArtistHat: 60: Expected ')' (to close '(' at line 1), got 'end' I dont understand ?! I went to this site, asked for help, and they gave me the code that is listed in the second block, the error was fixed, but the tool still did not work. Sorry for the vague data, I don't speak English good.

0

Ah, I understand now. So what you need to do is go back to your first question and ask them for help, they provided you with the second code block, so they will know best how to help you.