#Directional dash help
1 messages · Page 1 of 1 (latest)
You can use :Dot
it compares the direction of two things
You can compare the lookvector and movedirection
local example = humanoidRootPart.cframe.Lookvector:Dot(humanoid.MoveDirection)
or the other way around
it returns a scale of -1 to 1
lookvector is where the character is facing so if its 1 that means the player is moving in the direction they are looking at
-1 means they are opposite
so 1 is a front direction dash and -1 is back
for side to side directions you need to make a space around 0
so a range like -0.35 to 0.35
to determine left or right can do the same thing
you can get the rightvector
:Dot(movedirection)
if its 1 that would be right -1 is left
those are just the directions
for the dash you need to apply some kind of velocity like vectorforce for example pretty simple
@gleaming moon i followed a tut for a combat system but it isnt working for some reason can we like call and i screenshare yiou the scripts to see whats wrong or do i record and send you the stuff
also im like completley new to coding and it doesnt make sense to me
first send me the stuff
also how much experience do you have
for a combat system you'd probably need module scripts
ive got a day of experience and i was really just following a tutorial which never worked ill dm you