hi everyone, so i made this click-detector, but it wont add points. This script is in a normal script in serverscriptservice:
game.Players.PlayerAdded:Connect(function(player)
print("LeaderStats")
local stats = Instance.new('IntValue', player)
stats.Name = 'stats'
print("Stats")
local IQ = Instance.new("IntValue", stats)
IQ.Name = "IQ"
IQ.Value = 0
end)
This is a script inside of a tool in the starterpack:
script.Parent.Parent.Equipped:Connect(function(mouse)
mouse.Button1Down:Connect(function()
print ("clicked")
IQ.Value = IQ.Value + 1
end)
end)
In the output it says that IQ is not defined... how do i allow the localscript to use a local from the serverscriptservice?

1 comment
its litterally a intvalue in the player already wth