Hi there! I'm trying to spawn player on some location when they spawn, but I don't know why doesn't work.
function onJoin()
outputChatBox(tostring(source))
source:spawn(-2404.00000, -598.00000, 132.64844)
source:fadeCamera(true)
source:setCameraTarget(source)
end
addEventHandler("onPlayerJoin", root, onJoin)
In console i get : ERROR: [ResourceName]\[ScriptName].lua:[lineNumber]: attemp to index global 'source' ( a userdata value )
When i connect to server in chat i get : userdata: 00000097
Any ideas ?