OnServerEvent is not a valid member of RemoteEvent

I’m trying to use a remote event to spawn something in workspace from a gui on the players screen but everytime i join the game it says it isnt a valid member of it which i do not know why it is saying that, anybody have an explanation?

1 Like

This is in a server script, right? Also, could you provide a picture of your code, please?

1 Like

oh i think i fixed it because i confused the code with a function instead of a event

1 Like