I have a problem with leaderstats value of clicks.
local Players = game:GetService("Players") local clickDetector = script.Parent clickDetector.MouseClick:Connect(function(plr) local leaderstats = plr.leaderstats local clicks = leaderstats.Clicks print("your click value is "..clicks.Value) end)
For example, if i have 10 clicks, it keep show 0 clicks in console. How do i need to fix that?
You are connecting to the MouseClick event, and you are printing the value of clicks.. but you're not updating that value.
local Players = game:GetService("Players") local clickDetector = script.Parent clickDetector.MouseClick:Connect(function(plr) local clicks = plr.leaderstats.Clicks clicks.Value = clicks.Value + 1 print("your click value is "..clicks.Value) end)