Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make this add leaderstats GUI not local?

I have made a button that allows a player to add value to a leaderstat named ChaseCoins. This works perfectly, except for the fact that only the player who added the value can see it. For example, if there were 2 people in a game, they couldn't see each other's changes to their stats. How would I make this not local?

local Player = game.Players.LocalPlayer
local Leaderstats = Player.leaderstats.ChaseCoins
local Box = script.Parent.Parent.Value

function me()
Leaderstats.Value = Leaderstats.Value + Box.Text
end

script.Parent.Activated:Connect(me)

2 comments

0

You need to use Remote Events, everytime when you want to change a value and make it visible for all players on the server. Here for more information about Remote Events: https://developer.roblox.com/articles/Remote-Functions-and-Events

0

Would I make the remote event before hand, or would I "instance.new" it?

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.