So, I put an object value into workspace,named it "player", wrote a local script that said this in it:
wait()
game.Workspace.player.Value=game.Players.LocalPlayer
script:Destroy()
--this is to identify a local player, in a server script
and then I wrote a server script that gets that value:
game.Workspace.player.Changed:connect(function(value)
player=value
end)
--this connects the value in the object value I made earlier, to the local player
I get this as a result:
"attempt to index global 'player' (a nil value)"

7 comments
Where are you using the variable
playerthat you set in the server script?Better question: Why are you doing this? There can be more than one player in a server. If you want to know when they spawn, use CharacterAdded.
I set the variable 'player' under the second function. What I am basically attempting is to refrence a local player, so that I can use it in a Script, instead of a Local Script
What are you trying to make that requires this?
I'm trying to make a blackjack table, so that players can have money, and chips. And it saves that to each individual player. Does that make sense?
Why aren't you using the 'PlayerAdded' event instead of going through all that? Making a function that defines the Player, then the 'PlayerAdded' even to call the function which will define the Player?
Ok, I'll do that. Thank you guys for dealing with my noobness...