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)
You need a way for the local script to communicate with the server.
In this case, you will use remote events. https://developer.roblox.com/articles/Remote-Functions-and-Events
You can choose to spawn them in using instance.new if you wish. Put them in replicated storage for easy storage.