#Animation problems with an attack in my rpg

1 messages · Page 1 of 1 (latest)

wooden veldt
#

So this might be a hard one to get help with but I followed some of GnomeCode's RPG tut to help with the one i am already developing and so i am having a problem with an animation these two videos show what happens and what SHOULD happen and i will give the code used for the attack because the code GnomeCode used is the same any help is appriciated

blazing tree
#

any scripting tutorial that shows you how to make a rpg or a combat system or some battlegrounds game will ALWAYS be a waste of time since you are just copy n pasting everything from the video and not learning anything so when you come across a problem you dont know how to fix it. Ive fallen into this trap too its lowkey better to just learnt he basics and make these systems by urself.....Thumbs. (Also these tutorials usually have REALLY REALLY crappy code for some reason so you shouldnt really be looking at them in the first place lowkey)

wooden veldt
blazing tree
#

problem is its gonna be hard for someone to find the problem with ur code since theres quite a bit there

#

like ur playing animations and dealing damage in the same script that will get messy fast

#

if I were you id try make sure a script only has one job wether it be playing animations or dealing damage

#

it will help you narrow down where the problem since the scripts will be separated

wooden veldt
# blazing tree problem is its gonna be hard for someone to find the problem with ur code since ...

my problem here is that the Noob model I use is selected off of a gui so all of his attacking scripts running scripts, etc is in the model and I have a different script that handles all inputs like M1 alt 1, etc and uses a bind func that calls a local script inside of the input script so I don't entirely know how to alter it into a different set up currently do you have any like tips or pointers I can go off of that can help me?

#

if you need a visual if what i said is confusing here is the explorer to the noob model

blazing tree
# wooden veldt my problem here is that the Noob model I use is selected off of a gui so all of ...

1.Try avoid placing scripts in models or guis (this is just personal preference for me since I feel it can get messy) so you should try move the scripts out of the noob model and on the server.
2.you are you using a bindable function NEVER I mean NEVER use bindable functions or bindable events they a sign that ur code has a major problem and needs to be redone.(not sure why roblox even have them in the first place ngl)

If ur starting out a combat system is a bit complicated you should try do something a bit more simple and work from there....

blazing tree
#

oh no bro I got bad news....

wooden veldt
#

whats up? i mean I planned to change how you pick characters in a different way but Ive been working with what I already had

blazing tree
# wooden veldt whats up? i mean I planned to change how you pick characters in a different way ...

1.you have models inside gui...uhhhh yea def DONT do this...
2.you have multiple local scripts for attacks you should look into module scripts they help with this kinda of stuff and allow you to drop the bindable function.
3.try not use local scripts inside gui I think its fine in some instances but from my experience I tend to stay away from doing that but I know others who do it so its up to you I feel.

#

but you have the right idea of trying to separated ur attacks into different scripts

#

I feel if you look into module scripts and try to decouple the logic inside each script you will be fine

wooden veldt
#

so I have a few questions then

blazing tree
#

yea go ahead

wooden veldt
#

I am semi new to scripting so I dont know how easy this stuff Im about to ask is but

1:I wanted to use 4 different characters all with different kits how would I go about that in a good way?
Ex:1 with a normal punch, one use a sword, or one with a ranged M1

2:Where can I get the best help to guide coding Luau like this (Like what resources)?

blazing tree
# wooden veldt I am semi new to scripting so I dont know how easy this stuff Im about to ask is...
  1. honestly im really not too sure id have to think about how to design a system like this for a while.
    2.yea this is the annoying part theres not a lot of resources on complex systems theres a bunch of beginner stuff tho so you kinda have to figure it out on ur own sadly. (but brawl dev is super good for begineer tutorials) Id just recommend learning module and oop (I know people hate oop but starting out its not too bad) and go from there lowkey
#

the hard part about coding is not coding its actually designing the systems now THATS hard

wooden veldt
#

Yeah I understand that the systems is the hard part Ive made one game before kinda as a code test being a TD game but anyways with the character selection set up I have now though you recommend I should change is what Im getting?

#

and go to learn modules and oop?

blazing tree
#

yea that will allow you to make ur code more clean and make it easier to work with

#

oop also allows you have objects with properties and methods so you can use it to represent characters

wooden veldt
#

one question what does oop stand for?

blazing tree
#

oh yea oop stands for object oriented programming its a programming paradigm

#

the tutorials for oop are pretty bad tho ngl so it will take some time to learn

wooden veldt
#

how do you recommend I learn about oop then?

#

if you have any recommendations that is

blazing tree
wooden veldt
#

okay thanks

blazing tree
#

np good luck bro u got this

#

👍

wooden veldt
#

👍