#so yea idk what to do

1 messages · Page 1 of 1 (latest)

compact basin
#

Does it have a speed ?

safe barn
#

it does yea

compact basin
#

Try to increase it ?

safe barn
#

that does nothing

compact basin
#

I cannot help you anymore, I have thing to do sorry. Add Debug.Log, try to use Transform.Translate instead could be potential things that you can try.

safe barn
#

why can no one help me :((

nocturne gate
#

are you trying to make bullet thing?

#

try this bro

safe barn
#

Place this by fixedUpate

#

or

nocturne gate
#

i placed it on update

safe barn
#

i dont have bulletobject

#

gunbarrel

nocturne gate
#

make prefab bro

safe barn
#

oki

nocturne gate
safe barn
#

i dont have that

#

xd

nocturne gate
#

you can create empty gameobject at your gun

#

try align it at your gun

#

wait a bit

#

did your gun has collider?

safe barn
#

my gun has a collider yea

nocturne gate
#

that is why your object destroyed

#

put Destroy(gameObject);
to if (health != null) { // Deal damage to the object health.TakeDamage(damage); }

#

you can also do this

if (collision.gameObject.GetComponent<Health>() == null) return;
// Check if the bullet collides with an object with a health component
Health health = collision.gameObject.GetComponent<Health>();
// Deal damage to the object
health.TakeDamage(damage);
// Destroy the bullet upon collision with any object
Destroy(gameObject);
safe barn
#

oh wow

#

i hope this works

nocturne gate
#

it will

safe barn
nocturne gate
#

nice

nocturne gate
safe barn
#

the only thing now is

#

it has to go forwards

#

not to the side

nocturne gate
#

well your previous scripts is alright

nocturne gate
#

or use your previous scripts

nocturne gate
nocturne gate
#

my laptop isnt so gud so i just open note XD

safe barn
#

yea mine script is not working when i inplemend this

safe barn
nocturne gate
#

just gunBarrel.transform.forward

safe barn
#

still does nothing xd

safe barn
nocturne gate
#

hmm weird

safe barn
#

mhm

nocturne gate
safe barn
safe barn
nocturne gate
#

[SerializeField] private Transform gunBarrel;

safe barn
#

what xd

#

this is it noq

#

now

#

we are getting closer

#

i somehow fixed it

#

but now the bullet legit still does nothing

#

xd

nocturne gate
#

so you are new in unity eh

#

bulletSpeed is your speed

#

public float speed

#

hey try this