I'm not sure about this but I have a GUI button that functions locally and uses a remote event to enable some scripts in the player's character. The thing is that there is only one remote event and so every player that presses the button would fire the same event to change their own scripts in their character. I'm not sure if this even is the right way to do it.
Well, the thing that I'm really confused about is that what if multiple players press the button at almost the same time. Will the server script that listens for the event be able to do whatever it needs to do for all those players?
--Script local event = Instance.new("RemoteEvent") event.Parent = game.ReplicatedStorage event.Name = "Event" event.OnServerEvent:connect(function(player) player.Character.FallDamageScript.Disabled = false end) --Local script script.Parent.MouseButton1Down:connect(function() game.ReplicatedStorage:WaitForChild("Event"):FireServer() end)
Or maybe are there other ways to do this actually? I could maybe have a script that creates a remote event for every specific player that joins. Or wait can I actually create the remote event from the local script itself? I'm really quite confused now and I've got more ideas for this that I'm not sure about.
Yes, this is correct. You might want to add a debounce tho, since there's a bandwith limit on remote events (and functions)