How to make a fighting moves

Also would be possible for you to give me a link/video on this topic. I don’t really understand the links being shown.

2 Likes

I wanted to give you the functions you’d need, but the function page is down atm. Do you have a basic understanding of how to script?

1 Like

My main focus is on building and I can do a decent job on animations. Scripting is not my forte, and I usually would look at videos or through descriptions on a topic or part I need to work on.

1 Like

Okay, well I think it’s best that you ask a few questions in the Scripting Support category. There are lots of people who are able to explain the concept alot better than I can. For your skill level this might be a little bit too complicated for you to understand, but if you’re willing to go through the process of learning the mechanics of this. Head to the scripting support channel.

1 Like

Ok thank you for telling me this. I will check this out.

2 Likes

You can play an animation when the player presses a button.

Put this script in StarterCharacterScripts
Make sure it is a local script
Create an animation named Animation, that is parented to the script.


local Anim = script.Animation
local uis = game:GetService("UserInputService")

uis.InputBegan:Connect(function(key)
if key == Enum.KeyCode.E then --Replace E with whatever key you want to be pressed.
script.Parent.Humanoid:LoadAnimation(Anim):Play()
end
end)

5 Likes

Hello, I am a Dragon Ball genre game maker on Roblox. Dragon Ball has always been my favorite anime and yes I have incorporated it’s ideas into Roblox. I have made Advanced Combat Systems such as this one:

https://gyazo.com/e4170732da7158ea9a4b3f0246f2ccb2

External Media

The basic concept you need is a Key Table with User Input Service.

What I do, I detect if the player has clicked left or right mouse button, I check if it’s Enum.UserInputType.MouseButton1 or MouseButton2, if it is I use table.insert to insert “L” or “R” into the table. Then I iterate through the workspace to detect if I am facing a player and I am near them, if I am then I fire a remote event to the server, the Server receives the Enemy Root Part and the Player who fired the event and a validation whether or not the Player1 is near Player2 with the same magnitude check is done.

Here’s how this magnitude check works:

for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Model") then
	if v ~= PlayerChar then
		if v.PrimaryPart then
			local EnemyRootPart = v.PrimaryPart

			if (PlayerRoot.Position + PlayerRoot.CFrame.LookVector * 2 - EnemyRootPart.Position).Magnitude <= 4 then
				print("Player is looking at enemy")
				--Hit Event code here
			end
		end
	end
end

end

And yeah, that’s pretty much it for Hit Detection, you don’t need to use Region3 or Raycasting for this.

I would like to go in depth more on how you can make a Advanced Combat system like this but It’s a pretty big topic so if you want to contact me on Discord to get more information about how you can accomplish this system then yes, you can do so by adding: O v e r#1812 Thanks.

21 Likes

Thank you for the information I will be sure to check this out.

1 Like

No problem, like I said feel free to add me on Discord so I can give you additional information you need on how to accomplish this whole system.

1 Like

Very impressive work there! Looks awesome.

1 Like

Why is this in Art Design Support? It doesn’t fit the question. You should move this topic to Scripting Support.

1 Like

Actually it does fit this category because it revolves around animation. Please read what the category is for before trying to correct others.

You should use dot product to determine if your character faces the enemy. LookVector:Dot((enemycharpos - charpos).Unit) in simple terms you can think of this as generating a number between (-1)-1 determining how much the chat faces the enemy. 1 being perfectly facing the enemy and -1 completely not facing the enemy.

Oh sorry, I misunderstood this topic.

It’s alright. We all make mistakes.

I’m not going to, because that is just a pretty useless waste of time and solves nothing. The Magnitude with the LookVector check is what works for me and I’m going to keep it that way, many of devs that make Advanced Combat Systems like this use this Magnitude check.

Dot product is far from useless. Also I do advise on a different attitude if you want to evolve as a developer.

I’m just saying I’m not going to use it because the magnitude check is fine, so no I will not switch my method of determining if Player 1 is looking at Player 2. Also, when I said “useless” I was referring to using that method in this system is completely useless because it solves nothing and it’s not better / doesn’t improve anything.

Well using dot product would give you a more precise result, you could for example specify an angle threshold.

2 Likes

The Magnitude check is perfectly fine, no need of another method. I’ve used this method a lot and it’s ok to use, it’s always precise.

1 Like