So, i have a script, y'know, simple script.
local player = game.Players.LocalPlayer local leaderboard = player:WaitForChild("leaderstats") local price = 30 if leaderboard.Cashies.Value >= price.Value then leaderboard.Cashies.Value = leaderboard leaderboard.Cashies.Value = leaderboard.Cashies.Value - price.Value leaderboard.Pointies.Value = leaderboard.Points.Value - price.Value end end)
However, how can i make this script be a ClickDetector version? I already have a block with the clickdetector.
And the extra thing that is needed: It needs to work on filtering enabled.
Thanks for listening.
In a server script:
ClickDetector.MouseClick:Connect(function(player) local leaderboard = player:WaitForChild("leaderstats") local price = 30 if leaderboard.Cashies.Value >= price.Value then leaderboard.Cashies.Value = leaderboard leaderboard.Cashies.Value = leaderboard.Cashies.Value - price.Value leaderboard.Pointies.Value = leaderboard.Points.Value - price.Value end end)
Marked as Duplicate by minikitkat
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?