I want to be able to click a TextButton and have +1 Point to be added to the players leaderstat Server Side!
first make remote in replicated storage -- local script local remote = game.ReplicatedStorage.Remote -- find remote local plr = game.Players.LocalPlayer -- find player to use in normal script local gui = script.Parent -- put local script in the gui u wanna click gui.MouseButton1Click:Connect(function()-- setting clicking function remote:FireServer() -- firing remote end) --serverscript local remote = game.ReplicatedStorage.Remote -- finding remote remote.OnServerEvent:Connect(function(plr) -- when remote fired this will start i also passed trough plr so we can use that plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value + 1 -- this is a example of a value but yeh im adding +1 end)
i might have forgotten something so might not work comment if so
Remote Events:
https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events
Closed as Not Constructive by User#24403, ee0w, and yHasteeD
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?