Help me! Prestige and Checkpoint System

yeah
this is the pic-


and heres the script for the prestige -

local rBtn = game.Players.LocalPlayer.PlayerGui.PrestigeGUI.rFrame.TextButton

rBtn.MouseButton1Down:Connect(function()
	if game.Players.LocalPlayer.leaderstats.Stage.Value >= 50 then
		wait()
		game.Players.LocalPlayer.leaderstats.Stage.Value  = 1
		game.Players.LocalPlayer.leaderstats.Rebirths.Value = game.Players.LocalPlayer.leaderstats.Rebirths.Value + 1
	end
end)

Okay, while it’s running, look at Workspace->Players->gamerboy32111
and see if you have multiple leaderstats, if you do, there’s a problem–Then look under leaderstats
and see if you have multiple Stage objects, if you do, there’s a problem.

no there is only 1 leaderstats
have a look-w43w34

In the code you just posted, I noticed you have a LocalScript attempting to change the leaderboard–
Try changing that on the server side.

idk how to do that because i am new to scripting can u help me?

Take a study of this:

A RemoteEvent is a common way to send messages between client and server.

Once upon a time, one could do a lot more on the client side, but because of security issues,
this was tightened-up–So you’ll need to learn how to send various types of messages between the
client and server.

yeah so i have added local script in starterplayerscript as shown in the link u sent and have changed it to client-server but it still says that the stage value → 50 <—

I’m about to go to bed, but did you put a print() in the Script to show if the server indeed
got the message from event:FireServer() in the LocalScript? Your turnaround was pretty fast.
Did you create/put the RemoteEvent somewhere such as ReplicatedStorage in a Script?
Did you remember to event.OnServerEvent:Connect( listenerFn )?
If it wasn’t clear, a Script runs on the server, a LocalScript runs on the client.

my checkpoints were glitching so i deleted them all and i re added them but now i am getting this error Workspace.LeaderBoards:13: attempt to index nil with ā€˜CFrame’ and my ā€œstagesā€ in the leaderstats is stuck on 50 instead of 1

1 Like