#How do i script a fireball attack
28 messages · Page 1 of 1 (latest)
Well,
Detect user left click.
Send to server via a remote event.
Spawn fireball.
You'll soon learn about the difficulties of client-server interactions. 😦
module
?
Pointless. A script is good and enough, unless you want to make a full weapons system, then use a module, sure.
In any case, the real problem with fireballs and any type of weapon/vehicle is the server latency.
You can cure a bit the lag on 1 client, all the others will still suffer.
Gotta compensate the lag with some prediction.
Only problem is that predictions are inaccuraet.
client server communication is not difficult once you truly understand how it works
and yes for what you are trying to achieve, FastCast comes handy, pretty simple to use
you can calculate a deltaTime to prevent latency, its not 100% accurate but its barely noticable
"pointless"
if you do them wrong
I didn't say it's diffcult by itself.
???
You won't get away simply with a "deltaTime" (whatever you mean by that).
Player inputs are not linear and prevedible.
No, in any case they are inaccurate.
You can't predict what the users are going to do.
During the passage client-server-client you're gonna lose accuracy in any case.
You can do whatever you want to reduce it as much as possible, but nothing will be THAT great.