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

I cant change a value?

Asked by 3 years ago
Edited 3 years ago

I done a script (local script) that calls a remote event to change a player value Heres the script:

script.Parent.MouseButton1Click:Connect(function()
    game.ReplicatedStorage.NewAdd:FireServer(3)
end)

And heres the script in server script service:

game.ReplicatedStorage.NewAdd.OnServerEvent:Connect(function(plr,AddV)
    plr.Add.Value = AddV
end)

EDIT: I Said that when i click then i dont get the new value of my current value. In other words it did NOT changed.

0
I strongly recommend not doing this the way you are. If you do, that value can be exploited VERY easily. NotedAPI 810 — 3y
0
But i did a anti exploit thing JasiuJasiuB 13 — 3y
0
game.ReplicatedStorage.NewClicks.OnServerEvent:Connect(function(plr,Add) if Add >= 51 then plr:Kick("GET DUNKED ON YOU DIRTY HACKER! (Thx for hacking cause i could say that :D)") end plr.leaderstats.Clicks.Value = plr.leaderstats.Clicks.Value +Add end) JasiuJasiuB 13 — 3y
0
Explain your problem a bit more. All you've shown is your script. rabbi99 714 — 3y

Answer this question