When testing in-studio, communication with RemoteEvents to the client are almost instant. Once you start getting in-game, it is much slower. I'm assuming you are rendering this on the server side.
Solution
In order to fix this "delay", you have to do the rendering client-side. We want the LocalPlayer to feel as if their actions are instantaneous. It will render on their screen perfectly, then tell the server that it did an action. Now the server has a couple of options.
The server can either render it and make the player who requested to render it not display it (deleting or setting transparency).
The other route is to have the server :FireClient() to the other players and have them render it on their screens.
This will make it delayed for everyone else, but instant for the player who ran it. Good luck, those effects look pretty cool.
Edit:
Here is a script explaining what to do.
LocalScript
RemoteEvent.OnClientEvent:Connect(function(arg1)
local character_who_FireServer = arg1
local referencePoint = character_who_FireServer.Head.Position
end)
ServerScript
RemoteEvent.OnServerEvent:Connect(function(player, arg1)
local player_who_FireServer = player
local character_who_FireServer = arg1
for i,v in next, game.Players:GetPlayers() do
if (v ~= player_who_FireServer) then
RemoteEvent:FireClient(v, character_who_FireServer)
end
end
end)
Now once you :FireServer(), you have to provide arguments (arg1) to send in this case we need a reference point.
local arg1 = LocalPlayer.Character
RemoteEvent:FireServer(arg1)
See how arg1 travels to the ServerScript. The ServerScript then loops through all the players except the player who fired the event. The rest of the clients will receive the information with the Character object the LocalPlayer fired. Now you can use the LocalPlayer's Character as a reference point for all the other clients.
2 comments
Go to the developer console in the game and see if there are any errors. If there are, please tell us!
There are no errors :(