need help creating car game scripts! something wrong help

hi i watch tutorial on youtube and there dude after create script attach motorsphere to ispectors script sphereRB i not obtained do the same by drag and drop this just not happen

watch this please help me set my car vaz 2108 sputnik russian car to be drivable

i dream create car game help

here video i watched

look what happen when i push play

i need help

your Rigidbody is not part of the car. As you can see in the tutorial, the rigidbody is part of the car and only visible in the editor if the care gameobject is expanded. On your scene the MotorSphere gameobject is not a child of the car. You have to add it as child of the car.

ok i add now as child object but other problem when i push play car fall down and after i push stop it disapear from scense how to bring back the car?

Did you dragged the rigidbody from the scene to your script ?

I don´t know why it disapears, but you should check the tutorial again and compare every single step that is done in the tutorial with what you did

1 Like

i find the way back the car to place it was but i has other problems this to hard i follow step by step tutorial i watched but this not obtained create the same

something wrong in tutorial i shure beaceuse i do the same but this not obtained

maybe i need find private lesson teacher to unity for help me

in blender was more easy follow the tutorials but there no game engine anymore

i still need help to set my car driving maybe different tuorials

i will tald you new problem when i write a code in script as in youtube the “moveInput” is missing and program find mistake

somethink unclear in this tutorial not all steps maybe autor push pause and repair things in video and we missed steps

if you have problems in the code, please post your scipt (with code tags!) and the error from the error log.

With just saying “anything is missing” we can´t help you…

But… did you declare moveInput like in the video on min 7:45 ?

private float moveInput;

yes like in the video

but you wrote need also private float this didnt show in tutorial so was a mistake i will try wrote private float will tell you

7460917--915937--bugscript1.pnghere scrin of youtube and my code i try now priivte float dont help still error

You really have to compare much better your code and the tutorial, maybe do some break in between and you should learn some C# basics first as well.

Your code is completely different from the tutorial code…

You try to declare a private field inside a method, that doesn´t work.
This part has to be outside of the Update method:

private float moveInput;

you also try to call a method at the same time as you declare the field:

private float moveInput.GetAxisRaw...

and floats don´t have the method GetAxisRaw… you have to call this from “Input” and assign it to your field:

moveInput = Input.GetAxisRaw("Vertical");

i will never obtained learn C# this to hard for me

in blender was more fun

maybe you can write me code of all car script and i will do a copy paste

copy paste what i do in blender and all was work

also was append nice function in blender

also the code i type was the same as tutorial i try with rpivte float and without

nothink work

but note that when dude in video open first time his script it was different than my

because i was has problem attach script to object other topic

and this dude edit the script bit and after start film

so to me is hard now follows

also this annoyin and not so comfort watch you tube and type the same

so sad story i spend learn belnder 6 month learn it complete

already creat a car game but thing was missed in game and after belnder kill the game enigne not available in new blender

so sad

after i didnt try create games alot of time but now i want try i heard of unity i also try armory 3d but there not enough info to create car game

and no assets

and lear coding is heavy and hard i want learn coding but need find the right teacher who will made it simple for me

english not my native language is harder im live in israel russ israeli dude