I am trying to make a boat that uses remote events to communicate with the server script. When I tried this:
local seat = nil seat.Changed:connect(function() MoveEvent = seat.RemoteEvent end)
it gave this error: 10:00:02.427 - Players.Player.PlayerScripts.LocalScript:37: attempt to index local 'seat' (a nil value) notes: I can't just define a variable for that seat. I need it to work with any boat
If you mean you want this variable accessible from all serverscripts, then you must assign a global variable. So you would do this: _G.seat = nil