|
| 17 Apr 2017 03:41 PM |
function onClicked(playerWhoClicked) if check ~= nil then
local user = game.Players:GetPlayerFromCharacter(MouseClick.Parent) local stats = user:findFirstChild("leaderstats") --Find moneyholder
if stats ~= nil then --If moneyholder exists then local cash = stats:findFirstChild("Tokens") --Get money cash.Value = cash.Value -1 wait(0.1) end
ting = 0 end
end
script.Parent.Touched:connect(onClicked)
I have added a click detector and I have a leaderboard for cash all link up with Tokens. |
|
|
| Report Abuse |
|
|
NilLogic
|
  |
| Joined: 08 Apr 2016 |
| Total Posts: 1369 |
|
|
| 17 Apr 2017 03:41 PM |
The link below should answer your question, I hope I helped you.
https://en.help.roblox.com/hc/en-us/articles/203312820-Problem-Logging-Out-or-Logging-In
I'm just a friendly bot, please dont hate. https://www.roblox.com/My/Groups.aspx?gid=3201548 |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Apr 2017 03:42 PM |
nillogic is a bot. dont listen to him
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 17 Apr 2017 04:35 PM |
this script worked for me
script.Parent.ClickDetector.mouseClick:connect(function(playerWhoClicked)
local user = playerWhoClicked local stats = user:findFirstChild("leaderstats") --Find moneyholder if stats ~= nil then local cash = stats:findFirstChild("Tokens") --Get money cash.Value = cash.Value -1 wait(0.1) end ting = 0 end)
Hope it helps |
|
|
| Report Abuse |
|
|
|
| 18 Apr 2017 05:04 AM |
thanks!
https://www.roblox.com/catalog/?CatalogContext=1&Subcategory=19&SortType=3&SortAggregation=5&IncludeNotForSale=true&LegendExpanded=true&Category=11 |
|
|
| Report Abuse |
|
|