I was wondering, if how could i script something like on the image, i wanted to achieve when a Player hit another player with the sword the player will turned into highlighted. I couldn’t find an tutorial on it
When the player hits the enemy, add a highlight to their character. You could use raycasts, touched events, spatial queries for this. You could use ZonePlus and create a new zone, with the container being the MeshPart of the sword, and detect when the PlayerEntered event fires, and make sure its not the owner of the sword, then add a highlight to the enemy.
Is there any tutorials that i could follow
Try a normal sword tutorial, and when the enemy takes damage, add a highlight to the enemy’s character as well.
Define a variable, which is the Humanoid of the player’s character’s health. Then check if the player’s character’s humanoid’s health changed. After that, if the current health is below the variable, spawn a “Highlight” instance inside the player. Then, set the Highlight’s DepthMode to “Occlude”, set the OutlineTransparency of the Highlight to 1, then after that, use game.Debris:AddItem() to make the highlight disappear after a certain amount of time or use TweenService to do so.
Unfortunately i am not an programmer, and i don’t know how to use them
Hopefully, this helps. I am unable to code entire scripts for you, since that would be against the TOS.
If that’s the case, I suggest you go and follow a basic scripting tutorial first.
I know lua programming, 40% only but i don’t know how to use others
Well, what @gyuguybgjuf just described was using basic scripting functions and just changing properties of certain objects. What don’t you understand about his message?
Thank you for letting me having an idea on how can i actually create this! now i have finally achived this thanks!
||eroigjeiogjehrtehrtwrgji||
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.