How to script the vfx?

So my task is to make a script for vfx, I have an animation and the vfx itself. What do I need to do?

1. When you click on Q, the player teleports to the place where his mouse is pointing (if there is a player near this place, then teleports to this player)

2. If the player touched another player, then play an animation in which at a certain point appears vfx (just turn on Enabled)

3. If all of this happened, inflict 100 damage on the (enemy) player

Extra things Also during the animation, I would like the user’s screen to shake and turn purple. And the enemy’s screen would turn red

I am new to vfx, so I would like you to tell me how to do it all step by step, please)

2 Likes

This is gonna involve a few difficult concepts. Please research them further or ask me if you need to me detail them further.

  1. When the player presses Q, send a remote event to the server from the player.
    1.5. [OPTIONAL, FOR ANTICHEAT] Add a table of debounces with the Leaky Bucket Algorithm.
  2. On the server, if the mouse’s position is on another player’s character, continue. If not, just return.
  3. Set the character’s position to the mouse’s position + an offset
  4. Play the animation.
  5. Fire the remote event back to all clients with the VFX
  6. on the client, when the remote event is received, play the VFX.
  7. when the animation finishes, the enemy takes damage.

We aren’t going to give you the scripts but we can certainly help.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.