#💬 xulvilʹs Feedback
1 messages · Page 1 of 1 (latest)
@cosmic ingot if you dont mind me asking, how did you script the vfx?
not the actual code
the structure
broke it down into a few sections
obviously you have the animation events
- leg steps backwards [FIRST]
- projectile shoots out [SECOND]
on each of these animation events i made functions for what would happen, for example on the first one where the leg steps backwards, i need to emit the VFX, so i made it. i need to spawn the VFX from the path so i made a function there and combined the two of them into one that handles it easily so all i have to do is call one function, provide it the path to the smoke, and the part/attachment it should be parented to it and it handled it all for me
additionally we also have the charging effect, aura, blue overlay, and FOV changes. the first two were done pretty easily using the function above so nothing else there. the latter two were handled fairly easily by using a tween
the rest of the code follows a similar path, like the 2nd animation event has the projectile, FOV change (again), and more
the projectile itself uses a tween to move forward while running a RunService connection to check for collisions below using raycasts (which is a function) and then randomizes size, rotation, and direction. the connection also checks in front of the projectile for any collisions so it doesn't just phase through a wall
afterwards, if there's a collision or the tween makes it to the end i call a function to explode the part, play the impact frames, and clean up everything once all the particles have disappeared
you replicate this on the client right? where do you make the actual attack? Ive heard that making it on the client is bad for exploiters, so does that mean i need to make it inside the server side replicator?
it's a simple showcase move, no need for serverside communication
ALSO, animation events are used for this. You have to fire every time its an animation event or what
you will always start on the client either way, so not much you can do there
most people will play it on the client end and fire to the server
any movement/ability should generally be handled on the client otherwise you're going to get latency which for fast paced combat games is a massive no
you should take as much anti-exploit measures as you can but you'll have to cut your losses when it comes to making your game feel good
yeah i know that one
Im just stuck on the server side stuff. I think I have a videa of something im making/made
yeah here
this is me trying out replication
Just that attack takes a giant chunk inside the server side replicator, which gets really messy
it shouldn't be doing that unless you're handling it inefficiently
i can't really give you much advice on this, i'd recommend asking in #1020374354867007528 or bringing up a conversation a bout replication in #📜︱scripting
you can also look at some tutorials and see how they handle it
everyone does it differently, and everyone ive talked to never points me in a actual direction, just a vague answer
you should be limiting as many calls as you can since that's where more delay comes from and you'll eventually hit the limit
well how do i do that?
ive been thinking of um
the server side of the attack to be done in a modular script that is then just required
making it really organised
then a OOP based hitbox/replication system i can use
easiest way is pretty much just having the effect play on the client side, sending it to the server to replicate to other clients (you can limit it here by only doing those nearby, in a specific area, or wtv) and then playing the effect entirely on their end
as for the damage, cooldowns, and more backend stuff, that should all be on the server anyway
so there shouldn't be a need to replicate that
thats what i was planning to do, only ppl in set mag see it.
i ment handling, not replicate, my bad
but yeah alr ig
thanks winter!
mhm, best of luck
thx