The object just moves and rotates on the ground and it is not picking up. I need help please ASAP
@Iloveroblox452 жыл бұрын
I dont know why but when i press f it pick up but when i drop it , it does not go straight , it goes left and also when i press f it starts moving until i go in pickup range. PLEASE REPLY FAST I NEED IT
@SIS_GAMER5 ай бұрын
why my gun drop but dont pick, my gun rotate
@maximjacquet29422 жыл бұрын
This channel is sooo underrated. I love all the content you make and as a new programmer I really like all of your tutorials. Thank you so much!
@danyebest4805 Жыл бұрын
Ok
@princerudriyal95146 ай бұрын
I am working for my horror game i need realistic pick up feature and i saw your video but after complete the whole step it shows me this error MissingComponentException: There is no 'Camera' attached to the "First Person Controller" game object, but a script is trying to access it. You probably need to add a Camera to the game object "First Person Controller". Or your script needs to check if the component is attached before using it. Equip.Shoot () (at Assets/Scipts/Equip.cs:33) Equip.Update () (at Assets/Scipts/Equip.cs:26) Please help me for this Peace
@mikwns37223 ай бұрын
which key or button do you use to pick the object up
@pursuer76322 жыл бұрын
the script worked and i am able to unequip my gun when i press f but i cannot get it back to my hand when i press f agian it just rotates pls help
@PsychoStudiosOfficial2 жыл бұрын
How do I make it start on the ground?
@danyebest4805 Жыл бұрын
Ok
@armandopaez8882 Жыл бұрын
Your videos are a hidden gem. Thanks in advance. I wanted to ask you if you could give me a hint on how to pick up the weapon and reload the weapon with the same button: press once to reload and hold to drop and pick up the weapon that is on the ground, without an action affecting the other. I know it's not your obligation, just in case you can. Thank you.
@NoblobRS Жыл бұрын
This is actually very interesting because I don't know if I've ever done something like this before but I think I thought of something that works! I will try to test it and let you know if it works! :)
@armandopaez8882 Жыл бұрын
@@NoblobRS It is possible that it should not be as I am asking for it. Maybe I'm wrong. I mean creating a reload and pick up system with the same button as it works in most games like Fornite, War Zone, or Apex Legends, that is, while you are looting you pick up the weapons quickly by holding the button down, but that The same button is the one that works to reload the weapon. Especially on Gamepads. Possibly 2 scripts or something like that are necessary to achieve that system. Thanks.
@rowdylegion2 жыл бұрын
I tried this script but it says I have an error CS1003:Syntax error ‘,’ expected. I have no idea what that means, do you mind explaining it?
@NoblobRS2 жыл бұрын
First of all, It is much more likely that it said ";" unexpected so im not sure if that is a typo or not. If not, it just means that either a comma is missing from somewhere in the script (probably the "if (Physics.Raycast(Camera.transform.position, Camera.transform.forward, out hit, range))" part. If no commas are missing, then there might be a ";" or a "," somehwere that there is not supposed to be. Again, probably at the end of if "(Physics.Raycast(Camera.transform.position, Camera.transform.forward, out hit, range))", there is an extra ";". If none of these help, could you please send the whole error so i can see what line it is on? Thanks! Also, if you just want to be done with the error, the completed script is in the description! :)
@rowdylegion2 жыл бұрын
@@NoblobRS thanks for responding, I found out the problem and fixed it. I just forgot to include an =. I finished the script but the weapon just falls through the floor when unequipped. You already answered a question like that in a different comment so I'll use that. You're the first video I watched that actually worked in weapon pick up so thank you
@rowdylegion2 жыл бұрын
@@NoblobRS I seem to be having another problem with the weapon not letting me requip it. It's not falling through the floor anymore but it when I try picking it up it jolts up but falls down back to the ground. Do you know a way to fix it by any chance?
@NoblobRS2 жыл бұрын
I can't really think of anything at all that would cause that right now. Unless your weapon has an animation or something else different attatched to it maybe? I'm not too sure but if I think of something, I will let you know! Good luck!
@rowdylegion2 жыл бұрын
@@NoblobRS thanks
@xDDean3 ай бұрын
@noblob why does it fall through the map
@UnknownJst542 ай бұрын
THATS WHAT IM SAYING
@gnrinried2 жыл бұрын
when i drop my weapon it falls trough the map, why?
@NoblobRS2 жыл бұрын
Make sure your weapon has a Rigidbody and a collider. I think this could also happen if your terrain is too thin.
@gnrinried2 жыл бұрын
@@NoblobRS got them and my floor isnt really thin
@NoblobRS2 жыл бұрын
Could you floor not have a collider attached to it?
@gnrinried2 жыл бұрын
@@NoblobRS it does have one, and also i realised if i press f again the gun freezes mid air and when i press f to drop continues falling
@NoblobRS2 жыл бұрын
Thats very odd. Nothing like that has happened for me. Its possible that there's something else in your game that is interfering with it although I do doubt that.
@MANGASAGAS3 ай бұрын
who can i pick up the gun
@artdays95612 жыл бұрын
When I drop my gun, it falls through the map, Pls help!
@PlaneMusic46294 Жыл бұрын
add ridgidbody and a boxcollider to your gun
@danyebest4805 Жыл бұрын
Ok
@Buzala262 жыл бұрын
when i have item in my hands character automatically starts walking and doesn't stop. you have any clue why is that?
@NoblobRS2 жыл бұрын
My guess would be that whatever key you set to pick up the item is somehow interfering with your walking script. Other than that though, I have no clue how this is happening. Good luck! :)
@Buzala262 жыл бұрын
@@NoblobRS Soo I managed to fix backwards walking problem but.... now when I drop it and press pick up button it starts rotating :P btw sorry if am being kinda annoying.
@NoblobRS2 жыл бұрын
Dw about it! Is it continously rotating or does it do like a sudden jerk? (It might have something to do with this line: Gun.transform.eulerAngles = new Vector3(Gun.transform.eulerAngles.x, Gun.transform.eulerAngles.y, Gun.transform.eulerAngles.z - 45); )
@Buzala262 жыл бұрын
@@NoblobRS It's like when I press it, it rotates like 30 degrees and when I press pick up button again it does that again. and it goes like that again and again.
@NoblobRS2 жыл бұрын
Oh ok! So that was actually intentional because it was supposed to rotate on its side when you drop it! Try deleting this line: Gun.transform.eulerAngles = new Vector3(Gun.transform.eulerAngles.x, Gun.transform.eulerAngles.y, Gun.transform.eulerAngles.z - 45); That should fix it! Let me know if it doesn't! :) (it should be on line 47)
@mr_losduos46072 жыл бұрын
I cant pick the weapon up again why is that i can drop it there is no error???
@NoblobRS2 жыл бұрын
What exactly happens when you try to pick it up? does it disappear or does it just stay on the ground?
@mr_losduos46072 жыл бұрын
@@NoblobRS i figured it out i works now i just happens to set the pick up in the wrong palace of the code so it dindt play the only Thing i ha e to work on is when i drop My weapon i can pick it from evry where i am
@NoblobRS2 жыл бұрын
Try adjusting the distance (It should be set to 2 by default)
@bigboyhank62022 жыл бұрын
Hi Noblob, great tutorial. I have one problem. If you can help me fix it, I’ll like and sub. When I try to pick the weapon up it just jerks to the side. I have tried increasing the range. And everything please respond as fast as possible. Thanks
@ZefiDev2 жыл бұрын
Nice tutorial I can drop the gun but when i pick it it stays on the ground and it just changes direction
@Shonen.Snap07 Жыл бұрын
same here
@danyebest4805 Жыл бұрын
Ok
@DeadDayDev5 ай бұрын
same pls help
@amirsharifnia33682 жыл бұрын
when i try to pick it up the gun ust bobs up and down i have tried increasing the range and everything
@xermi00 Жыл бұрын
Hey, I'm having a problem with this. When I press F and I drop the item it collides with the Player and follows me and my Mouse Look. Do you know how to fix that?
@danyebest4805 Жыл бұрын
Ok
@sternsascha19937 ай бұрын
Könnten Sie ein Inventar System und zeigen wie man sowas macht so das man 3d Items verwenden kann. Ich finde nix orgendliches 😐 was wir helfen könnte.
@TeachMeSam Жыл бұрын
It's very basic, doesn't help me much, but you got a sub cause you have more interesting vids to watch. Keep up the good work!
@danyebest4805 Жыл бұрын
Ok
@mitlopz5192 жыл бұрын
i can drop my gun yes but im still shooting without gun how can i fix it ?
@lungomungo2 жыл бұрын
HALP when i drop my object, the transform player goes out of the other components, like camera and player transform, causing my player not to move and look only on the y axis
@fishussugon3215 Жыл бұрын
not sure if you're describing a mistake that i have experienced but was able to solve by myself but makes sure "Player Transform" transform is attached to the script, not the entire Player prefab parenting the Camera
@danyebest4805 Жыл бұрын
Ok
@AntoineMathieu-pm4zo8 ай бұрын
I drop and my camera and my player freeze
@zouxa2 жыл бұрын
when i try to pick up the gun it just moves around on the floor
@NoblobRS2 жыл бұрын
Try increasing the range?? Let me know if this doesn't work so I can look into it! thanks! :) Also, make sure the weapon has the target script applied to it.
@zouxa2 жыл бұрын
@@NoblobRS yes the weapon has a script in it
@yassirbholah36532 жыл бұрын
@@NoblobRS same problem,increasing the range makes it move further away
@bigglasses26256 ай бұрын
The revolver moves away from me when I move
@bigglasses26256 ай бұрын
I figured it out, turning on interpolate and continous detection causes this
@KilleraserPros3 күн бұрын
tysm
@fatahmadrid78062 жыл бұрын
Thank you Keep up bro And thanks to give us scripts that what i like about you this is sow nice from you you are the best
@NoblobRS2 жыл бұрын
Thank you!
@zouxa2 жыл бұрын
or it starts to rotate when i try to pick up
@NoblobRS2 жыл бұрын
I think someone else had a similar issue so you can try some of the things i told them to try to see if it works!
@zouxa2 жыл бұрын
@@NoblobRS i tried but you sill cant pick it up anit doesnt rotate anymore
@zouxa2 жыл бұрын
also Im using unity standard assets fps controller so should this still work with it
@learntech33232 жыл бұрын
thanks for the tutorial but when i copied the script it made an error and the error is the namespace already contains a definition for 'Target' please reply as fast as possible
@NoblobRS2 жыл бұрын
Did you accidentally add 2 Target scripts?
@learntech33232 жыл бұрын
Yeah i think i accedintaly did Thank you very much You really will get a lot of subscribers in the future Keep it up dude 👌
@mrbobo46142 жыл бұрын
is it possible to have more weapons? so there is not just one pick up
@NoblobRS2 жыл бұрын
Yes, It will work with multiple weapons, youll just need to replicate both scripts for each weapon! :)
@danyebest4805 Жыл бұрын
Ok
@bigglasses26256 ай бұрын
@@NoblobRS When I tried this, it picking up the original weapon
@yassirmuhammad.b9732 жыл бұрын
Hello, I'm using a weaponholder for weapon switching (a video from brackeys ) but i want one of my guns to be able to pick up how can i implement this code in the weapon holder
@danyebest4805 Жыл бұрын
Ok
@ninjaLoveTheWorld2 жыл бұрын
Thanks for your video it’s easy to follow and it helps me clear my codes! I’m having a issue that when I drop the weapon it falls under the ground (mesh collider for ground) and I have rigid body and box collider for my weapon, I also have the target script for weapon. Do u know what’s going on?
@ninjaLoveTheWorld2 жыл бұрын
I’m using unity 2020.3.25 though not sure if that is the issue. Do you recommend a newer version or is 2020 the better one?
@NoblobRS2 жыл бұрын
I think some other people had the same issue! If your ground isn't a terrain and can be easily adjusted, try making it thicker! If you can't do that, you can try some of the things I suggested to the other people! :)
@NoblobRS2 жыл бұрын
I'm using the 2020 also version because the newest version is usually more buggy but it shouldn't really matter that much! :)
@VdubVR Жыл бұрын
All you have to do is add a box collider
@danyebest4805 Жыл бұрын
@@NoblobRSok
@Clasher_76172 жыл бұрын
When I try to pick up the gun just moves
@NoblobRS2 жыл бұрын
Have you applied the Target script to the gun? :)
@Clasher_76172 жыл бұрын
@@NoblobRS yes
@Steamgoguema Жыл бұрын
i cant pick up help me
@danyebest4805 Жыл бұрын
Ok
@thinkfreely12702 жыл бұрын
Thanks
@benbeyy69142 жыл бұрын
for me when i equip it it goes to the bottom of the screen any idea on how to fix it?
@NoblobRS2 жыл бұрын
Just move the Player Transform to wherever you want the gun to go when you equip it! So like move the player transform higher up. (The gun goes to the player transform when you equip it) If this doesn't work, let me know so I can try and help further! Thanks! :)
@ciaranfxfilms Жыл бұрын
Thank you so much!
@danyebest4805 Жыл бұрын
Ok
@ChanzOntop Жыл бұрын
the weapon moves witht he character
@thg1nrediar2 жыл бұрын
Good
@dexisha Жыл бұрын
@noblob it works fine to drop it but not pickup for me!
@arkothegamedev Жыл бұрын
I Have an Issue. When I Drop The Item it Falls Through Terrain.I Added Rigidbody But it Still Falls Through Terrain.What Should I do?