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

Roblox function has no errors but isnt working?

Asked by 4 years ago
game.ReplicatedStorage.Commenced.OnServerEvent:connect(function(voted ,selection)
    print("recived")
    if selection == "Dragon" then
        print("line1 works")
        game.ReplicatedStorage.DragonVote.Value =                    
                     game.ReplicatedStorage.DragonVote.Value + 1

        if voted == true then
            game.ReplicatedStorage.Value = game.ReplicatedStorage.DinosaurVote.Value - 
 1
        end
        print("works")
end)
0
can you explain what is printing? SoftlockedUnderZero 668 — 4y
0
or use output under the view tab? SoftlockedUnderZero 668 — 4y
0
or script analysis? SoftlockedUnderZero 668 — 4y
0
You are not explaining what the script is intended to do, meaning I cannot help. raid6n 2196 — 4y
0
I fixed it sorry User#22145 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Fixed it by the first event on fired i need to put "player" because it thought player was voted "player, voted ,selection)

Ad

Answer this question