I need help with adding 1 subscriber to the leaderboard. I'm making a game about holding a gear and every-time you click, 1 subscriber is added to the leaderboard. I looked it up and found
local Subscriber = game.Players.Player.Model.Subscriber.Value
function GiveSubscribers() Subscriber = Subscriber + 9999 script.Parent.Parent:Remove() end
script.Parent.MouseClick:connect(GiveSubscribers)
I'm not sure if this is right and if it is, how do I set it up to work? what else should I try?
local Subscriber = game.Players.Player.Model.Subscriber.Value function GiveSubscribers() Subscriber = Subscriber + 1 end script.Parent.MouseClick:connect(GiveSubscribers)
local Subscriber = game.Players.LocalPlayer.Model.Subscriber.Value -- Model should be named "leaderstats" function GiveSubscribers() Subscriber = Subscriber + 1 -- change amount to what you want script.Parent.Parent:Remove() end script.Parent.MouseClick:connect(GiveSubscribers)
Hope this works, if not, check output and if there are any errors, comment on this answer