Hello, so I made some magic skills that are not working as they should be. If you watch the video below, you will see that the skill I used breaks on other screens except for the casters. Why? Well, it’s because the skill was created on the client.
Even though I know the issue, I don’t know how to solve it. 2022-03-24 03-54-53
There was nothing on the DevForum, so my only solution is to ask directly. If you have any solutions, please let me know. Thank you.
Basically everything that you do in a local script, gets done for only the one player, other players wont see any changes of it.
So for example if you teleport your player in a local script, for all the other players he will remain in the same position.
If you want something to happen for everyone, you should use a normal (server) script. Just change your code of the effect to the server script.
You can also use remote events to do most of the stuff in a local script, and only the important effects in a server script, as that will be better for performance. But if your game isnt too big, i wouldnt worry that much about script optimization
I used client sided effects, which means I created the effects with a local script. Everyone can see the effects even though they were created through the client. Issue is the effects break when someone resets. I want to change from client to server instead, but then I wouldn’t be able to have accurate hitboxes.
Why wouldnt you be able to have accurate hitboxes? They work exactly the same on server and on client. Even better on server cuz then people wont be able to cheat.
Im pretty sure if you re doing the effect on client, other players wont see it. Do your effect and change to other players view, you will not see anything
Are you using .Touched Client detection for that giant fire ball move? Because if so, that is an insanely bad idea, it will be super vulnerable to exploiters.
You should really only use client side hitbox detection on melee attacks, NEVER long range/huge projectile magic or anything similar.
Are there any solutions to accurate hitboxes for projectiles then? I don’t really see any options. Games such as Elemental Battlegrounds have pretty accurate hitboxes, but I don’t have a clue how they do it.
Mate now you re just being lazy, we just told you all the possible solutions. Why are you asking for help if you are going to stick to your (wrong) opinion and not even try the suggested help?
I also told you why your reasons are not valid, and to use both local and server scripts for your effects, to avoid the problems and harvest the benefits of both. Have you tried that? Or are you waiting for a ready script?
The only thing you told me was the effects would be the same if I switched to server side. I know that. But I don’t want the fireball exploding 3 seconds before impact.
Server also tells all Clients in the game to create VFX of Fireball move on their Client.
This is in my opinion the most optimal way of doing magic moves, that have intensive VFX.
The delay between each of steps is dependent on peoples ping, which is usually like 0.05 seconds, which is pretty much nothing.
Also, I personally have never had issues with .Touched for projectile attacks, so I’m not really sure what issues you be having with it when used on the server.
Roblox studio: better projectiles - YouTube Good example of what I’m taking about. As you can see, when he was using the server instead, the fireball dealt damage way before it even hit the player.
This is because of there being a slight delay of a part’s physics replication to the client when first spawned on the server for less than a second. If you look at it on the server the hitbox should be perfectly accurate, but on the client it will look like the projectile is lagging for almost a second after the projectile is created.
This is way I say to create a hitbox on the server, and do VFX on the client.