#Why isnt my code working?

1 messages · Page 1 of 1 (latest)

untold schooner
#

its in renderstepped and i want my characters head to be pointing in the direction of movement like the humanoids velocity but im not sure how, i tried this but it really isnt working so does anyone have a solution?

humble granite
#

likely the multiply not + when you do the direction

tranquil vesselBOT
#

studio** You are now Level 2! **studio

humble granite
#

adding vector3 and Cframe aren't the logical "add" you're trying to do

untold schooner
#

wait i just realised these will clash wont they

humble granite
#

lmao doing it twice will definitely cause it to clash

untold schooner
#

im not sure how to implement this new function because i need them both working together is there anyway i can merge them together?

humble granite
#

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

untold schooner
#

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

untold schooner
tranquil vesselBOT
#

studio** You are now Level 5! **studio

humble granite
untold schooner
#

okay thanks ill try work on it

humble granite
untold schooner
# humble granite 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 😭

humble granite
#

you'll have to explain or show an example of what you want, I am not fully sure

untold schooner
#

like rotate the character in the path of the arc

lunar kite
#

i have a feeling

lunar kite
#

with ai

untold schooner
#

until i dont lmao

#

like now

lunar kite
#

no cus

untold schooner
#

im new to luau tho

lunar kite
#

ive seen WAY too many ai skidded code snippets

#

from variable names down to logic

untold schooner
#

wait whats skidded?

lunar kite
#

for example,

#

ive seen ai name many new instances or stuff as new and then the name

#

also

untold schooner
#

i copied the newCFrame btw yuh like the comment

lunar kite
#

ai usually makes a new line for each argument

#

if its long

untold schooner
#

yesyes i took the newCFrame from ai but i thought i understood what it would do but its not working as intended

lunar kite
#

alr

untold schooner
#

as expected of ai lmao but i cant seem to work a way to work around it

lunar kite
#

i never use ai for coding

#

cus of this

#

its hella trash for advanced stuff

#

but this isnt even advanced

lunar kite
#

what u mean

#

n what ur tryna do

#

can u elaborate

#

@untold schooner

untold schooner
untold schooner
#

instead of flying while upright

lunar kite
#

use bodygyros

untold schooner
#

wait brb bathroom

untold schooner
lunar kite
#

js

#

set the cframe of the body gyro

#

to the tilt times the look rotation

#

put it in renderstepped on the client

untold schooner
#

wait why renderstepped i would have thought heartbeat because its physics no?

lunar kite
#

also dont use assemblylinearvelocity

lunar kite
#

u can

#

also

#

remember to clean up the connection afterwards once ur done

#

to save ur memory

untold schooner
#

how do you do that?

lunar kite
#

cleaning up a connection?

untold schooner
#

also btw it says bodygyros are deprecated on the roblox forms should i still use them?

untold schooner
lunar kite
#

js destroy it

#

but i usually use troves

#

by sleitnick

untold schooner
#

wait so make renderstepped a variable or something and disconnect it when its done?

lunar kite
#

js use heartbeat

#

its better for physics

untold schooner
#

yeye heartbeat but still should i do that where i disconnect it when im done?

lunar kite
#

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

untold schooner
#

yesyes i understand now

#

bro how do you stay motivated when something isnt working for days 😭

lunar kite
#

huh

#

u js do

#

keep the mindset up

#

listen to music or some shit

#

it helps trust m

#

e

untold schooner
#

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 😭

untold schooner
lunar kite
#

comms r useless to me

untold schooner
lunar kite
#

i am

#

but like

#

well

#

let me rephrase

#

comms are useless to me

#

cus i barely get any

#

lmao

untold schooner
#

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 😭

lunar kite
#

im mostly a solo dev

#

cus most of the teams ive ever been in

#

everyone was beginners or everyone was skids

untold schooner
#

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

lunar kite
#

opposite for me

#

lol

#

ik how to do shit

#

but dont get ideas

untold schooner
#

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

humble granite
#

@untold schooner did you manage to fix it or are you still cooked

tranquil vesselBOT
#

studio** You are now Level 3! **studio

humble granite
#

the solution he gave would likely work

untold schooner