#Hilo

1 messages · Page 1 of 1 (latest)

inner laurel
#

ok, lets talk right here

visual lake
#

so what do i do

#

@inner laurel

inner laurel
#

have you installed visual studio 2022?

visual lake
inner laurel
#

sure?

visual lake
inner laurel
#

do you have that on your computer?

inner laurel
visual lake
#

i have it

#

😭

#

i cant do it

inner laurel
#

if you had it it would be like that...

visual lake
#

sorry for waisting your time

inner laurel
visual lake
#

i have a idea but idk how to do it

#

can i delete does??

#

@inner laurel

inner laurel
#

hmm, let me think a moment

visual lake
inner laurel
inner laurel
visual lake
#

why??

inner laurel
#

its part of the program

visual lake
#

yeah can i ask you something??

inner laurel
#

sure

visual lake
#

could you help me just making the movement??

#

just that

#

like w a s d and space only that

#

@inner laurel

inner laurel
#

3d or 2d?

inner laurel
visual lake
inner laurel
#

damm, my internet is too slow hehe, sorry for the late xD

visual lake
#

thats fine put 3d

inner laurel
visual lake
#

in unity

inner laurel
#

trust me, that's really hard

#

and it takes too much time

visual lake
visual lake
inner laurel
#

i know how to do it

visual lake
#

WRONG ONE

inner laurel
#

you mean you wanna invite me to your proyect, right?

#

or i'm wrong?

visual lake
visual lake
#

invite you

#

please dont griff

inner laurel
#

is not that easy, and i don't have that much time, so i could tell you all right here

visual lake
#

like your gonna help me??

#

but not in the project

inner laurel
#

right

visual lake
#

so what do i do

inner laurel
#

hmm, you have the proyect, right?

visual lake
#

yeah matrix

visual lake
#

yeah

inner laurel
#

You could first start creating a simply plane and a sphere

visual lake
#

its ok capsule??

inner laurel
#

we don't care about the shape :>

visual lake
inner laurel
#

i recommend you rename both to ground and player

visual lake
#

ok

#

done now?'

inner laurel
#

ok

#

so, as you see, the capsule has a component named capsule collider, right?

visual lake
#

yeahhhhhhhhhhhhhh

#

THERES IS

inner laurel
#

ok, so it is like the object that is gonna be responsible of collisions

visual lake
#

ok

inner laurel
#

now, we are going to add another component to the player

#

a rigidbody

visual lake
#

ok

inner laurel
#

that's the component that is gonna controll physics

visual lake
#

X Y Z???

inner laurel
#

nope, gravity, forces and that kinda things

visual lake
#

ok

#

mass???

inner laurel
#

for example

#

once you've added it click on play, and youll see the capsule it's affected by gravity

visual lake
#

yeah

#

like its going down??

#

when i click the play

inner laurel
#

exactly

#

do you see it?

visual lake
#

the capsule falling down??

inner laurel
#

yeh

visual lake
#

yeah

inner laurel
#

perfect

visual lake
#

so now??

inner laurel
#

as you can see we have a problem

visual lake
#

yeah

inner laurel
#

no, we don't have it already xD

#

my fault

#

but we will have it, the player is gonna fell into the floor

visual lake
#

wait why is the capsule going down but the camera stays there

#

and now??

inner laurel
#

to avoid the player rotation, click on there

#

once that's done, we can start programming it

visual lake
#

ok

inner laurel
#

i forgot telling you that you can "play" with the player on scene window

inner laurel
#

ok, lets create the script...

visual lake
#

oki

inner laurel
#

the script is a file that contains the code, i recommend you to create a folder named scripts and then right click and new c# script

#

name it for example PlayerMovement

visual lake
#

oki

inner laurel
#

tell me once you have it opened

visual lake
#

oki

#

its open

#

@inner laurel

inner laurel
#

let me open it

visual lake
#

oki

inner laurel
#

have you deleted something, right?

visual lake
#

yeah

#

the thing down playermovement

inner laurel
#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}```
visual lake
#

only this??

inner laurel
#

nope

visual lake
#

oh

inner laurel
#

that is what you've deleted, right?

visual lake
#

huh

#

the script???'

inner laurel
#

or the script was empty?

visual lake
#

its was empty

inner laurel
#

certainly that's quite weird

visual lake
#

theres was my old script

inner laurel
#

oh, you may have deleted it before

#

we dont care about it

visual lake
inner laurel
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

#

paste that

visual lake
#

same script??

inner laurel
#

what?

visual lake
#

movement

inner laurel
#

oh, no

visual lake
#

what

inner laurel
#

just once at the top :>

visual lake
#

ohhhhhhhhhhhhhhhhhhhh

#

and now???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

inner laurel
#

ok

#

we are going to first create a var called speed

visual lake
#

what a var+

inner laurel
#

do you know what are vars?

visual lake
#

lol

visual lake
inner laurel
#

ooff, those vars are like containers that containt different values

visual lake
#

OHHHHHHHHHHHHHHHHHHHHHHHHHHH

inner laurel
#

for example the points of a shooter

#

the health of a player

#

or in this case the speed of our player

visual lake
#

ok

#

so what do i do now

#

i close the script??

inner laurel
#

nope

#

inside it

visual lake
#

the same script

inner laurel
#

yeah

#

public float speed = 5f;

visual lake
#

do i have to copy that abd paste???

inner laurel
#

paste that before the start void

visual lake
#

like this'?

inner laurel
#

send me full ss

visual lake
inner laurel
#

nono

visual lake
#

so where

inner laurel
#

the var goes up the start

#

appart from that, everything that starts with // is a comment, something that is just for you, the code is not gonna read that line

visual lake
#

i need to delete that line??

inner laurel
visual lake
#

ok

#

like here??

inner laurel
#

where?

visual lake
inner laurel
#

the next line

visual lake
#

bro i have to go to sleep coul you send me the entire script

#

and tommorow where gonna finsih it

#

its 23:45

inner laurel
#

suree, ```csharp
using UnityEngine;

public class PlayerMovement: MonoBehaviour
{
public float speed = 5.0f; // Movement speed

void Update()
{
    // Forward movement
    if (Input.GetKey(KeyCode.W))
    {
        transform.Translate(Vector3.forward * speed * Time.deltaTime);
    }

    // Backward movement
    if (Input.GetKey(KeyCode.S))
    {
        transform.Translate(Vector3.back * speed * Time.deltaTime);
    }

    // Left movement
    if (Input.GetKey(KeyCode.A))
    {
        transform.Translate(Vector3.left * speed * Time.deltaTime);
    }

    // Right movement
    if (Input.GetKey(KeyCode.D))
    {
        transform.Translate(Vector3.right * speed * Time.deltaTime);
    }
}

}

visual lake
#

UHHHH YOU ALREDY FINISH IT??

inner laurel
visual lake
#

lets do this fast quick

#

i copy and paste now???'

inner laurel
#

yeap

#

i have not tried it, it should work

visual lake
#

ima close the script oki??

inner laurel
#

save it first

visual lake
#

oki

inner laurel
#

crtl + s

#

or file > save

visual lake
#

did it

#

its in my foulder

inner laurel
#

then open unity and send me full ss of your unity screen to check it

#

once, just drag the script into your Player

visual lake
#

oki

#

oki

#

its still not working

#

and camera its saying script missing

#

@inner laurel

inner laurel
#

i think you have not correctly saved the code

visual lake
#

its saved

#

when i go in the script theres the thing

inner laurel
#

click on this just one time

#

and send me ss of the inspector

visual lake
#

oh

#

done

inner laurel
#

as you can see, all is empty

visual lake
#

and now??

inner laurel
#

open it doing double click

#

and paste it again...

#

i really recommend you to watch a tutorial carefully following all steps...

visual lake
#

and now??

#

ok

inner laurel
visual lake
#

how??

inner laurel
#

file, save

#

not save as, just save

visual lake
#

did

inner laurel
#

check on the inspector if the code is there

#

again

visual lake
#

bro unity crashed

#

its saying something

inner laurel
visual lake
#

emm

inner laurel
#

restart unity

visual lake
#

its still the same

#

i saved you wanna a video look

inner laurel
#

bruhh, let me find a video for you

visual lake
#

no no

#

look

#

huh

#

@inner laurel

#

ima go to sleep see you tommorow

inner laurel
#

it's fine

#

byee

visual lake
#

Just help me tomorrow

visual lake
#

Yall alive??

#

@inner laurel

inner laurel
#

I could help you tomorrow

visual lake
#

Thats fine

inner laurel
#

And just DM me

#

If you want

visual lake
#

Theres school

inner laurel
visual lake
#

@inner laurel

#

ITS WORKING

#

ITS WORKING

#

STILL SOME BUG LIKR THE CAMERA ITS NOT FOLLOWING THE PLAYER BUT THE PLAYER IS MOVING

inner laurel
#

Good news

visual lake
inner laurel
#

I recommend you to try making the camera to follow the player

visual lake
#

yeah but when i move the caspule falls down by gravity

visual lake
#

fixed again

#

its not falling anymore

inner laurel
visual lake
#

look

inner laurel
#

But now there is no Gravity xD

visual lake
#

so i cant jump??

inner laurel
#

Look on constraints

#

In rigid body

#

Of the capsule

#

And freeze rotation in z

inner laurel
visual lake
#

ok

#

did it

inner laurel
#

To jump we have to add a vertical force, and if there is no Gravity, the character is going to go up and up

visual lake
#

how to add vertical force??

inner laurel
#

Create another if

#

But with space key

visual lake
#

of the script??

inner laurel
#

Yep

#

And instead of getKey field use getKeyPressed

#

Cause we just want to detect a single tap on the key

visual lake
#

uhhh im not understanding

#

i need to go will talk later

inner laurel
#

Me to

inner laurel
visual lake
#

Are you free tonight??

#

So we can go on of the project

visual lake
#

@inner laurel

#

@inner laurel

#

could you give me the script with the jump

inner laurel
#

It would be smth like this

#

using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
public float speed = 5.0f; // Movement speed
public float jumpForce = 8.0f; // Jump force
private bool isGrounded; // Check if the object is grounded

void Update()
{
    // Forward movement
    if (Input.GetKey(KeyCode.W))
    {
        transform.Translate(Vector3.forward * speed * Time.deltaTime);
    }

    // Backward movement
    if (Input.GetKey(KeyCode.S))
    {
        transform.Translate(Vector3.back * speed * Time.deltaTime);
    }

    // Left movement
    if (Input.GetKey(KeyCode.A))
    {
        transform.Translate(Vector3.left * speed * Time.deltaTime);
    }

    // Right movement
    if (Input.GetKey(KeyCode.D))
    {
        transform.Translate(Vector3.right * speed * Time.deltaTime);
    }

    // Jump
    if (Input.GetKeyDown(KeyCode.Space) && isGrounded)
    {
        GetComponent<Rigidbody>().AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
        isGrounded = false;
    }
}

void OnCollisionEnter(Collision collision)
{
    // Check if the object is grounded
    if (collision.gameObject.CompareTag("Ground"))
    {
        isGrounded = true;
    }
}

}

#

But I don't recommend you to just copy and paste code without knowing what it does...

visual lake
#

TYYY

#

not working the jump :((

#

@inner laurel

#

or first can we do first person script??

visual lake
#

@inner laurel

inner laurel
#

Later I try to help you, I am not at home yet

visual lake
#

:((

#

oki

#

but we need to make this fast we have the game project

#

who makes the best game in one day he will get a reward and your my only chance please

#

@inner laurel

inner laurel
#

If you just wanna create kinda a game and you just need to program simple scripts, I recommend you to ask it to chatgpt

visual lake
#

i dont have chat gpt

inner laurel
#

So just go to Microsoft bing and ask it to bing chat

#

Another AI

visual lake
#

and its saying impossible to ask

#

your my only chance

inner laurel
#

Bruh men I'm out and it's impossible for me to help you rn 🥲

#

See Google gemini

#

Or another AI

#

There are a lot

visual lake
#

i just need to make first person

inner laurel
#

Is not that easy to copy and paste one script...

#

FIRST PERSON MOVEMENT in 10 MINUTES - Unity Tutorial

In this video I'm going to show you how to code full first person rigidbody movement. You can use this character controller as final movement for your game or build things like dashing, wallrunning or sliding on top of it.

If this tutorial has helped you in any way, I would really appreciate...

â–¶ Play video
#

Watch carefully any video like that one...

visual lake
#

that it not woking

#

ima try

visual lake
#

@inner laurel

visual lake
#

are you at home??

inner laurel
#

I just arrived

visual lake
#

YES

#

COULD YOU HELP ME

inner laurel
visual lake
inner laurel
#

Hmm like for example Fortnite one?

visual lake
#

YEAH

#

like turn around just in first person

inner laurel
#

Hmm, so you wanna make the character to rotate itselfwith the camera behind him, right?

#

With the mouse... I suppose

visual lake
#

wait how old are you??

visual lake
inner laurel
#

15 xD

visual lake
#

im 13 but i sound like 10...

#

could we mabye call with no talking and ima show you what im doing??

#

it will be more easy

inner laurel
#

Could you just send me a ss of your scene?

visual lake
#

ok

#

like i want to have first person rotating up down lef and right

#

lets get started

#

what do i do??

inner laurel
#

Let me think one moment

visual lake
inner laurel
#

Could I ask you one thing?

visual lake
inner laurel
#

You just wanna have the character full movement, right? Would it be a good idea to use a predefined character controller to save you trouble?

#

Or is the point of programming it entirely...?

visual lake
#

we need to make this quick just help me with the camera please

#

i need to go to sleep

inner laurel
#

Ok, create a camera

visual lake
#

did

#

i just need the script 😦

inner laurel
#

Could I try to create it previously in a few minutes?

visual lake
#

yeah

inner laurel
#

I'm trying to finish it as quickly as possible hahaha, I know it's a little late and you might have to go to sleep

visual lake
#

you try to do it ima finish the mapa

inner laurel
#

Perfect

visual lake
#

ping me when you done

inner laurel
#

ok, i have it

#

@visual lake

visual lake
#

YAY

#

does it work??

#

what do i have to do

inner laurel
#

Yep, i have to say i have not created it myself entirely, but it perfectly works :>

#

im gonna send it to you

visual lake
#

the script??

inner laurel
visual lake
#

where to put it

inner laurel
visual lake
#

🙂

inner laurel
visual lake
#

so camera

inner laurel
visual lake
#

ok

inner laurel
#

camera has to be inside your character

visual lake
#

ok

inner laurel
#

and then, you have to add the script to your camera

#

once, you have to drag your player to there

#

and that's it

visual lake
#

emmm

inner laurel
#

click on your script...

#

not get into it

visual lake
#

emmm

#

@inner laurel

inner laurel
#

let me check one thing

visual lake
#

😦

inner laurel
#

send me full ss

#

of all screen i mean

visual lake
#

script??

inner laurel
#

nope

inner laurel
#

all your window

visual lake
inner laurel
#

certainly its so weird, it works for me

visual lake
inner laurel
#

let me think a moment

visual lake
#

ERRORS

inner laurel
#

send me them

visual lake
#

huh

#

but is saying now errors

#

:((

#

what do we do now??

#

@inner laurel

inner laurel
#

we are going to do one thing, and probably the best for you

#

i'm gonna send you smthng

inner laurel
#

Download that

#

and right click on your assets window and click on there

visual lake
inner laurel
#

yep, that

#

import it

visual lake
#

and now'??

inner laurel
#

and drag that into your scene

#

and delete your's one

#

that is gonna work perfectly

visual lake
#

ALL MY PLAYER

#

LIKE MOVEMENT??

#

i have to delete

inner laurel
#

yea

#

don't worry

visual lake
#

i did it

inner laurel
#

is gonna work

visual lake
#

and now??

inner laurel
#

send me full ss

#

to check all...

#

it shold be working

visual lake
#

ERRORS

#

whyyyyy :((

inner laurel
#

don't panick

#

send me ss of your console

visual lake
#

i deleted them..

inner laurel
#

press play

visual lake
#

or clear

inner laurel
#

press play again

visual lake
inner laurel
#

and they should get there again

visual lake
#

what do i do

#

:((

inner laurel
#

but of the errors

visual lake
inner laurel
#

do you have any script in the proyect?

visual lake
#

LOOK FAST

#

i have movement

#

first person

inner laurel
visual lake
#

so what others??

inner laurel
#

the one i send you yesterday

#

have you deleted it?

visual lake
#

mh?

#

what??

inner laurel
#

have you deleted the script i send you yesterday?

#

playermoment

visual lake
#

THE SCRIPTS ARE BLOCKING THE THING

visual lake
inner laurel
#

delete it

visual lake
#

first person??

#

look

#

to??

inner laurel
#

i dont want you to touch anything inside this folder, right?

visual lake
#

IST WORKING

#

but not

#

rotaiting

#

AND NOW WHAT IST NOT TURNING

inner laurel
#

have you moved your mouse?

visual lake
#

its missing a script...

#

camera one

#

first person camera

#

GIVE ME THE SCRIPT

inner laurel
#

I gave you the entire controller!

visual lake
#

:(((

#

its a mess 😦

inner laurel
#

just do what i say you, delete evrything related to your player

#

all scripts, all folders and all

visual lake
#

like the script

inner laurel
#

all

visual lake
inner laurel
#

all

visual lake
#

player look

#

ALL

inner laurel
#

delete all

visual lake
#

from my old one

inner laurel
#

the entire folder

#

yep, your old one too

#

just do what i say you

#

delete all cameras from your scene and your player too

#

once, send me ss

#

right?

visual lake
#

wait it wasent easy to just put the old sript that i deleted

inner laurel
#

delete that too

visual lake
inner laurel
#

ss of this, please:

visual lake
#

ok then??

inner laurel
#

please :>

visual lake
#

look

inner laurel
#

go back

#

and delete the entire folder of mini first person controller

visual lake
#

bto i need to go to sleep

#

FAST

inner laurel
#

its fast

#

delete your scripts folder too

visual lake
#

EVERY THING???

inner laurel
#

just both folders i say you

#

with all inside them

visual lake
#

GO

#

WHAT FOULDERS

inner laurel
visual lake
#

its gone

#

all gone

inner laurel
#

once, import the package i sent you before

visual lake
#

ok

#

THEN??

inner laurel
#

and drag exactly that capsule to the scene

#

make you sure its the same!!!

#

not the other

#

and then press play

visual lake
#

NOW??

#

OKK

inner laurel
#

please, tell me it works

visual lake
#

ITS WORING THANK YOU

#

IMA WIN THIS

#

THANK YOU

#

THANK YOU

#

THANK YOU

#

THANK YOU

#

THANK YOU
YOUR AWESOME THANK YOU

#

THANK YOU SO MUCH

#

YOUR MY HERO THANK YOUU

inner laurel
#

It includes sounds, sprint and also you can crouch

visual lake
#

NO

#

ITS NOT WORKING

#

I CANT ROATE

#

ROTATE

inner laurel
#

wtf

visual lake
#

ITS SAYING SCRIPT MISSING

inner laurel
#

fuckk

#

i think its my prob

#

hehe

visual lake
#

😦

inner laurel
#

i know what is happenning

visual lake
#

WHAT

#

i closed unity and saved

#

and i re eneter and its not working

inner laurel
#

let me send you another final package

#

hehe

#

that will work 100%

visual lake
#

FAST MY DAD ITS ANGRY PLEASE

inner laurel
#

done

#

that should work 100%%%%%

visual lake
#

its the same one

inner laurel
#

before I moved the folder script and forgot to leave it where it was going xD

inner laurel
#

it has the missing script

visual lake
#

ITS WORKING

#

HOW TO SAVE

inner laurel
visual lake
#

not working

#

resend the link

#

NOW

#

with the script ima finish tommorow

#

bye

inner laurel
# visual lake bye

It has been a pleasure to help you hahajsaj, it has been a bit difficult, but we have ended up achieving it

#

You'll tell me

#

🙂

visual lake
#

Resned the link

#

Please

inner laurel
#

wich one?

#

what is not working?!

visual lake
#

@inner laurel

inner laurel
#

what?

visual lake
#

Resend link

#

Resend link

inner laurel
#

wich link!!

visual lake
inner laurel
#

like that?

visual lake
#

Ty

#

The problem was i click the x and i did save

#

I re join the game

#

Script missing

#

@inner laurel

#

Ima just save tomorrow like you

inner laurel
visual lake
#

THE GAME WORKS

visual lake
#

@inner laurel

#

heyyyyyyyyyy

#

could you help me heartsShyPlead_sc

inner laurel
#

Tell me :>

visual lake
#

grabbing objects??

#

with E

inner laurel
#

Again with that man? Have you googled how to do it?

visual lake
#

every time it giving me a error

inner laurel
#

That's probably related to the controller

visual lake
#

how to fixheartsShyPlead_sc

inner laurel
#

If it doesn't affect to your game that shouldn't matter to you

visual lake
#

its saying cant play games with errors heartsShyPlead_sc

inner laurel
#

hmmm, so they are errors in red, not in yellow

inner laurel
#

oh, i thought you were saying to me yellow ones

#

so wich is the error?

visual lake
#

player controller

inner laurel
#

but send me a ss of the entire error

visual lake
#

tryitandseeoki

#

HERE POOKIE

#

so what??

inner laurel
#

man, i need to see the script to gess what's happenning

#

:> I'm not a wizard

#

could you send it to me like text?

visual lake
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class objPickup : MonoBehaviour
{
public GameObject crosshair1, crosshair2;
public Transform objTransform, cameraTrans;
public bool interactable, pickedup;
public Rigidbody objRigidbody;
public float throwAmount;

void OnTriggerStay(Collider other)
{
    if (other.CompareTag("MainCamera"))
    {
        crosshair1.SetActive(false);
        crosshair2.SetActive(true);
        interactable = true;
    }
}
void OnTriggerExit(Collider other)
{
    if (other.CompareTag("MainCamera"))
    {
        if(pickedup == false)
        {
            crosshair1.SetActive(true);
            crosshair2.SetActive(false);
            interactable = false;
        }
        if (pickedup == true)
        {
            objTransform.parent = null;
            objRigidbody.useGravity = true;
            crosshair1.SetActive(true);
            crosshair2.SetActive(false);
            interactable = false;
            pickedup = false;
        }
    }
}
void Update()
{
    if (interactable == true)
    {
        if (Input.GetMouseButtonDown(0))
        {
            objTransform.parent = cameraTrans;
            objRigidbody.useGravity = false;
            pickedup = true;
        }
        if (Input.GetMouseButtonUp(0))
        {
            objTransform.parent = null;
            objRigidbody.useGravity = true;
            pickedup = false;
        }
        if(pickedup == true)
        {
            if (Input.GetMouseButtonDown(1))
            {
                objTransform.parent = null;
                objRigidbody.useGravity = true;
                objRigidbody.velocity = cameraTrans.forward * throwAmount * Time.deltaTime;
                pickedup = false;
            }
        }
    }
}

}

#

HERE

inner laurel
#

let me take a fast look at it :>

visual lake
#

ok

#

if you cant help nvm

inner laurel
#

i'll try it :>

visual lake
#

i need to go to sleep BYE

visual lake
inner laurel
#

suree, i'll try to give you a solution

visual lake
#

oki

inner laurel
#

@visual lake It was a silly error hehe

#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class OBJECTS : MonoBehaviour
{
  public GameObject crosshair1, crosshair2;
  public Transform objTransform, cameraTrans;
  public bool interactable, pickedup;
  public Rigidbody objRigidbody;
  public float throwAmount;

  void OnTriggerStay(Collider other)
  {
    if (other.CompareTag("MainCamera"))
    {
      crosshair1.SetActive(false);
      crosshair2.SetActive(true);
      interactable = true;
    }
  }
  void OnTriggerExit(Collider other)
  {
    if (other.CompareTag("MainCamera"))
    {
      if (pickedup == false)
      {
        crosshair1.SetActive(true);
        crosshair2.SetActive(false);
        interactable = false;
      }
      if (pickedup == true)
      {
        objTransform.parent = null;
        objRigidbody.useGravity = true;
        crosshair1.SetActive(true);
        crosshair2.SetActive(false);
        interactable = false;
        pickedup = false;
      }
    }
  }
  void Update()
  {
    if (interactable == true)
    {
      if (Input.GetMouseButtonDown(0))
      {
        objTransform.parent = cameraTrans;
        objRigidbody.useGravity = false;
        pickedup = true;
      }
      if (Input.GetMouseButtonUp(0))
      {
        objTransform.parent = null;
        objRigidbody.useGravity = true;
        pickedup = false;
      }
      if (pickedup == true)
      {
        if (Input.GetMouseButtonDown(1))
        {
          objTransform.parent = null;
          objRigidbody.useGravity = true;
          objRigidbody.velocity = cameraTrans.forward * throwAmount * Time.deltaTime;
          pickedup = false;
        }
      }
    }
  }
}
visual lake
#

New script??

inner laurel
#

the same

#

but corrected

visual lake
#

Ty

inner laurel
#

that name (the class name) needs to be the same the file one

#

I hope it's just that