|
| 07 Sep 2015 11:19 AM |
12:18:11.962 - Workspace.Recieve:3: attempt to concatenate field '?' (a nil value) 12:18:11.963 - Stack Begin 12:18:11.964 - Script 'Workspace.Recieve', Line 3 12:18:11.965 - Stack End
script:WaitForChild("CallServer") script.CallServer.OnClientEvent:connect(function(player, arguments) local k = script.Parent.Parent.Kart local s = script.Parent.Parent.StartPosition game.Workspace.Data:FireServer(k.Value) game.Workspace.Data:FireServer(s.Value) end)
event2 = game.Workspace.Data event2.OnServerEvent:connect(function(player, arguments) print(player.Name .. " says " .. arguments[1]) print(player.Name .. " says " .. arguments[2]) end)
I am special because I have a siggy (👌 ͡° ͜ʖ ͡°👏) |
|
|
| Report Abuse |
|
|
Saldor010
|
  |
| Joined: 20 Sep 2010 |
| Total Posts: 1035 |
|
|
| 07 Sep 2015 11:27 AM |
It's throwing that error because arguments[1] is a nil value, and does not exist. Try adding an if statement in front of your print's to check before you try and concatenate any potential nil values. For example:
event2 = game.Workspace.Data event2.OnServerEvent:connect(function(player, arguments) if arguments[1] and arguments[2] then print(player.Name .. " says " .. arguments[1]) print(player.Name .. " says " .. arguments[2]) else print("Hey, your arguments don't exist!!") end end)
|
|
|
| Report Abuse |
|
|
|
| 07 Sep 2015 11:30 AM |
Nvm I got it to work by myself sorry for wasting your time. I just put both values in a table ({k.Value, s.Value})
I am special because I have a siggy (👌 ͡° ͜ʖ ͡°👏) |
|
|
| Report Abuse |
|
|