Script

Guys I need help, I’ve been working on my game for hours. And I got stuck with this problem.

Ive writing my script, which is

public float velocity = 1;

I’m very sure that I finished it correctly because I already check it for errors and it says none. But when I look it on the inspector, I couldn’t find the velocity which should be in the script.

Tyia.

where did you put the float? I bet it’s in a function and not the class?
can we see the code?

try adding an f, but this should be the fix.
public float velocity = 1f;

2 Likes

Thank you very much, I’ll try this.

I put it below the class, before void start

did you attach the script to a game object?