A localscript in a tool doesnt know a local i made in serverscriptservice?
Asked by
5 years ago Edited 5 years ago
hi everyone, so i made this click-detector, but it wont add points.
This script is in a normal script in serverscriptservice:
01 | game.Players.PlayerAdded:Connect( function (player) |
03 | local stats = Instance.new( 'IntValue' , player) |
07 | local IQ = Instance.new( "IntValue" , stats) |
This is a script inside of a tool in the starterpack:
1 | script.Parent.Parent.Equipped:Connect( function (mouse) |
2 | mouse.Button 1 Down:Connect( function () |
4 | IQ.Value = IQ.Value + 1 |
In the output it says that IQ is not defined... how do i allow the localscript to use a local from the serverscriptservice?