y error:: - Workspace.tool.Script:3: attempt to call a RBXScriptSignal value
scrip in toool:
while true do wait(1) local Players = game:GetService("Players") local tool = game.Workspace.tool tool.Activated(function() local Money = Players.leaderstats.TIX local Money = Players.leaderstats.TIX Money.Value += 1 end)
translation: Why the error? This script is supposed to give 1 leaderstat when the tool is equipped and gets clicked
The error:
Workspace.tool.Script:3: attempt to call a RBXScriptSignal value
Script:
while true do wait(1) local Players = game:GetService("Players") local tool = game.Workspace.tool tool.Activated(function() local Money = Players.leaderstats.TIX local Money = Players.leaderstats.TIX Money.Value += 1 end)
dude here is the fixed script.. u so dum and put the script inside the tool doofus
-- u dont need a damn while true do local tool = script.Parent tool.Activated:connect(function() -- bruh do u even know how to connect functions?? local plr = game.Players:GetPlayerFromCharacter(tool.Parent) -- this how u get player actual way local Money = plr.leaderstats.TIX -- select it once bruh Money.Value = Money.Value + 1 -- use ur brain end)
hello, OFF_S4LE!
I made this answer based on what we chatted on the Website Chat
-- no loop needed local tool = script.Parent --As you told me at ScriptingHelpers chat, tool is scripts's parent tool.Activated:Connect(function() local Player = game.Players:GetPlayerFromCharacter(tool.Parent) -- Define player based on character local Money = Player.leaderstats.TIX --You dont need to define the variable 2 times Money.Value = Money.Value + 1 -- += don't exists in lua end)