#Why isnt my code working?
1 messages · Page 1 of 1 (latest)
likely the multiply not + when you do the direction
** You are now Level 2! **
adding vector3 and Cframe aren't the logical "add" you're trying to do
like its moving my character but DEFINATELY not the way i want it to lmao, the only way i can describe it is that its like facing one direction constantly but changing occasionally
wait i just realised these will clash wont they
lmao doing it twice will definitely cause it to clash
im not sure how to implement this new function because i need them both working together is there anyway i can merge them together?
not asking you to leak what you're trying to make but if you want to move two separate parts of a player's char you need to specify the specific parts you want to move
i dont mind saying its just a small project basically i have a double jump explosion ability so i made it so that when you use it it makes the character face the direction you used it in, thats the first block, then now id like the character rotate forward according to the velocity so the character should form an arch with their rotation if that makes sense
oh and i would like to move the whole character
** You are now Level 5! **
don't do both under renderstepped then, it sounds to me like the first block could be done without renderstepped and then the arch thats formed can be done under renderstepped
okay thanks ill try work on it
yo r u still online?
whats up
Idk why I only got notified now lol but anyways I've managed to detach the snapping position from heartbeat but now the code just plain doesn't do the thing I'm looking for but I'm not sure where I went wrong 😭
you'll have to explain or show an example of what you want, I am not fully sure
sorry for late response but this is what i mean
like rotate the character in the path of the arc
i have a feeling
that this code is skidded
with ai
i am used to coding in c# on unity and i use ai as a tool but i write and understand my own code
until i dont lmao
like now
no cus
im new to luau tho
wait whats skidded?
for example,
ive seen ai name many new instances or stuff as new and then the name
also
i copied the newCFrame btw yuh like the comment
yesyes i took the newCFrame from ai but i thought i understood what it would do but its not working as intended
alr
as expected of ai lmao but i cant seem to work a way to work around it
i never use ai for coding
cus of this
its hella trash for advanced stuff
but this isnt even advanced
im not sure
what u mean
n what ur tryna do
can u elaborate
@untold schooner
yes i suppose it would but im trynna speed up my learning with it
so basically like that poor diagram, im looking to make the players head face the direction hes travelling
instead of flying while upright
use bodygyros
wait brb bathroom
can u explain?
js
set the cframe of the body gyro
to the tilt times the look rotation
put it in renderstepped on the client
wait why renderstepped i would have thought heartbeat because its physics no?
also dont use assemblylinearvelocity
ig
u can
also
remember to clean up the connection afterwards once ur done
to save ur memory
how do you do that?
cleaning up a connection?
also btw it says bodygyros are deprecated on the roblox forms should i still use them?
yeye
js destroy it
but i usually use troves
by sleitnick
A Trove is helpful for tracking any sort of object during
runtime that needs to get cleaned up at some point.
wait so make renderstepped a variable or something and disconnect it when its done?
yeye heartbeat but still should i do that where i disconnect it when im done?
as i said
its for the sake of ur game's performance
memory is one of the utmost things u needa pay attention to
when making a game
bad memory management = bad game performance and more lag spikes
for players
yesyes i understand now
bro how do you stay motivated when something isnt working for days 😭
huh
u js do
keep the mindset up
listen to music or some shit
it helps trust m
e
bro like i feel like i cant find anyone to help me work on this game lmao your a first
and i cant even take comms because it wont let me verify 😭
thats the best
i dont
comms r useless to me
are you not for hire?
i am
but like
well
let me rephrase
comms are useless to me
cus i barely get any
lmao
lmao
id love to be in a team of devs
but like even like a team of new devs
but i can never find one 😭
swr everyone just spawns in a team or not 😭
im mostly a solo dev
cus most of the teams ive ever been in
everyone was beginners or everyone was skids
yeye id love to but i need experience yk
and bro id genuinely work so hard if i got i none lmao
for the love of the game
i always have the best ideas but can never execute them the way i see them
idk man i just find it so satisfying to watch a dev make a game in like a couple days and im stuck here with the basics with all these ideas 😭
id say im a quick learner but i have no idea what to learn if that makes sense
@untold schooner did you manage to fix it or are you still cooked
** You are now Level 3! **
the solution he gave would likely work
im still cooked lmao