Because a remote event doesn't work if I put a local location in the serverscript on a line

I will show the functional script first and then the broken one:



On line 20, if I take the game out of the script and switch to what is on line 6, it will not work, any reason for that to happen?

1 Like

Do any errors occur? If so, what are the errors?

1 Like

could you explain more? I don’t know what are you telling

1 Like

You sent to same screenshot of the server script twice.
Like @Tonnumkung4 said, can you please explain what you want?

1 Like

Works fine for me, that’s strange:
image
image

The two images are different from each other at the last line.

1 Like

sorry for not specifying what was going on. So I had to test a remote event system (Server → Client) and I removed the “game” on line 20 to get what was on line 6 to work. But for some reason the script won’t do anything when I do this (it doesn’t even make mistakes).

1 Like

this error is not new now, it happened with other scripts I made in the past yet I don’t know if this is a roblox error

1 Like

What is it?
Please Tell(30chars)

1 Like

what does the script do? has to do with a remote event from the server to the client

1 Like

Yes, I know that, but what is the error?

???

1 Like

I’m saying that this problem of the script working well with other users and not working with me (in relation to remote events) has been going on for a long time

1 Like

I’m still not getting what you are saying.
How is the script not working well for you because of remote events?

1 Like

forget it but it’s better, I’ll see how to solve it later.

1 Like

The client isn’t loaded on PlayerAdded. I suggest for anything involving a client needing to instantly get data when the client loads to use a RemoteFunction instead then return the data you need.

Edit: Another solution is to use a CharacterAdded event instead. But I stand by my statement that I believe it’s a lot cleaner and more efficient to use a Remote function on data that needs to be gotten right when the client is loaded.

3 Likes