So in this game that I’m making I know how to make punches, kicks and I’m quite sure on how to make other different type of moves but I don’t know how to make you use them. Kinda like clicking a certain button or like Dragon Ball Z Final Stand where you can click and use a number as a move (for example). I hope I had made this as clear as possible and thank you in advance!
You can use userinputservice for certain buttons, and dragon ball z final stand uses a custom backpack with tools.
Well thanks for the response, but since I’m kind of new to all of this I don’t really know what a userinputservice is. Is that something you would put into a script?
You’d first make the animations, and then once they’re made you can script them to play. Based on your confusion, I suggest you take a look at these links:
This has a lot to do with scripting
Alright I will check out these links. Thank you!
Also would be possible for you to give me a link/video on this topic. I don’t really understand the links being shown.
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?
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.
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.
Ok thank you for telling me this. I will check this out.
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)
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 MediaThe 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.
Thank you for the information I will be sure to check this out.
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.
Very impressive work there! Looks awesome.
Why is this in Art Design Support? It doesn’t fit the question. You should move this topic to Scripting Support.
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.