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 4 years ago

`

local tool = script.Parent 


tool.Activated:Connect(function() 
    local character = tool.Parent 
    local players = game:GetService("Players") 
    local player = players:GetPlayerFromCharacter(character) 
    local leaderstats = player.leaderstats 
    local currency = leaderstats.Cash 
    local addition = 10000 

    currency.Value = currency.Value + addition 


end)`    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