Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Would i make this tool function work straight away?

Asked by 5 years ago

`

01local tool = script.Parent
02 
03 
04tool.Activated:Connect(function()
05    local character = tool.Parent
06    local players = game:GetService("Players")
07    local player = players:GetPlayerFromCharacter(character)
08    local leaderstats = player.leaderstats
09    local currency = leaderstats.Cash
10    local addition = 10000
11 
12    currency.Value = currency.Value + addition
13 
14 
15end)`    this script works fine but when I load into my game I have to unequip the tool and re equip it before the mouse click does anything, any help is appreciated thanks,

Answer this question