So I want to make a textbutton that when you click it, it resets your stage, and your DataStore. How would I do this in FilteringEnabled?
This is the script I made with a REGULAR SCRIPT in a TextButton. I know regular scripts don't work in TextButtons, but I'm confused, as you can't access DataStore through LocalScripts.
local data = game:GetService("DataStoreService"):GetDataStore("Stage") script.Parent.MouseButton1Up:connect(function(player) player.leaderstats.Stage.Value = 0 local key = "user_" .. player.userId data:SetAsync(key, player.leaderstats.Stage.Value) end)
Please help!
This is the way to make localscript communicate with server script
https://www.youtube.com/watch?v=C0qQ4lDa3t0
Here a video tutorial