0
I’ve already tried
remoteEvent:FireAllClients()
remoteEvent:FireServer()
but it didn’t work. It said that FireServer
could only be used by the client. I also tried:
--No server script em workspace
remoteEvent:FireClient(script.LocalScript)
--No local script em workspace.Script
remoteEvent.OnClientEvent:connect(function()
remoteEvent:FireServer()
end)
but it didn’t work either. Only when I changed the location of the script to StarterPlayer.StarterPlayerScripts
and changing the argument of FireClient
for game.StarterPlayer.StarterPlayerScripts.LocalScript
worked.
Then I changed the argument from FireClient
for game.Players.Player1
(test player in Studio) and also worked.
But to complicate it I cannot insert the local script into game.StarterPlayer.StarterPlayerScripts
because this folder inserts everything it has in it (including non-scripting objects) into a folder called PlayerScripts
within a player entering the game, all players will be left with the localscript that will fire the remote Event, which cannot be fired several times at a time.
BUT I FINALLY need a script that fires the remote Event to the server and client.
PS:For those who want to help me, but don’t have much experience with ROBLOX Studio, I’ll briefly explain:Server scripts will act only on the server and local scripts will act on the client (on the player’s PC) and remote Vents are objects in which has 2 special events,one will be detected by server scripts (OnServerEvent
) and the other will be detected by local scripts(OnClientEvent
) and that can trigger these events when "listening" to the functions FireServer
,FireClient
and FireAllClients
,which I don’t need to explain what you’re going to do because if you play games on the moon it’s because you know English