local in serverscriptservice is not defined?
hey everyone,
im making a simulator game, but when i click it says the local i made is a nil value:
01 | game.Players.PlayerAdded:Connect( function (player) |
03 | local leaderstats = Instance.new( 'IntValue' , player) |
04 | leaderstats.Name = 'leaderstats' |
07 | local IQ = Instance.new( "IntValue" , leaderstats) |
13 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
15 | local ServerStorage = game:GetService( "ServerStorage" ) |
18 | local Toolnumber 1 clickEvent = Instance.new( "RemoteEvent" , ReplicatedStorage) |
19 | Toolnumber 1 clickEvent.Name = "Toolnumber1clickEvent" |
22 | local function onToolnumber 1 clickEventFired(player, number) |
23 | IQ.Value = IQ.Value + 1 |
26 | Toolnumber 1 clickEvent.OnServerEvent:Connect(onToolnumber 1 clickEventFired) |
do you know why it says its a nil value? please tell me :)