generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Dropping an item infront of a player?

Previous Thread :: Next Thread 
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 04:55 PM
How would you drop a model infront of the player, keeping the orientation? I tried using moveto, setprimarypartcframe and translateby but cant seem to get it right.


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:03 PM
Use torso's rotation and raycasting
or lookvector


Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:06 PM
Other ideas? Their has to be a simpler way


Report Abuse
vectorGunner is not online. vectorGunner
Joined: 23 Mar 2014
Total Posts: 784
04 Oct 2016 05:11 PM
"their" really isn't...
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:13 PM
GnomeBrick.Position = Torso.Position + Torso.CFrame.lookVector * 3



Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:14 PM
Its not a brick, its a model.


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:15 PM
##################################################################################################################################
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:16 PM
Uhm what? It is hashtagged.


Report Abuse
WoolHat is online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
04 Oct 2016 05:17 PM
Change that model's primarypartcframe
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:18 PM
the script got hashtagged idk why

GnomeModel:SetPrimaryPartCFrame = CFrame.new(Torso.Position + Torso.CFrame.lookVector * 3)

be sure to set primary part before hand


Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:18 PM
" I tried using moveto, setprimarypartcframe<--"
Can you explain how to use it, I was trying that, but I couldnt get it to work.


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:19 PM
u can set the primary part like setting transparency, in studio or via script.

do that then use my script/modify for your needs


Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:20 PM
I put
drop:SetPrimaryPartCFrame(CFrame.new(char.Torso.Position + char.Torso.CFrame.lookVector * 3))
Still has the same exact issue of not going to its position


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:22 PM
Did you set the primary part?

What is the output?



Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:23 PM
No output.

drop.Parent = game.Workspace
drop.PrimaryPart = char.Torso
drop:SetPrimaryPartCFrame(CFrame.new(char.Torso.Position + char.Torso.CFrame.lookVector * 3))


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:30 PM
drop.PrimaryPart = char.Torso
why are you setting the primary part to the torso...
we're moving the primary part to a location forward of the torso, if it is the torso we are moving then it's basically a jump script.


Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:31 PM
So what should I set it to?


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:41 PM
A central part of the model you are trying to drop in front of the player...
a primary part of the model, you could say.


Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:42 PM
So like, the character?
Workspace?


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:47 PM
If your model is a truck, then have the base of the truck be the primary part.

If your model is a box, then have the bottom of the box be the primary part.

If your model is a cute lil baby gnome, then have the baby's towel be the primary part.


Report Abuse
WoolHat is online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
04 Oct 2016 05:48 PM
The primary part is any part in the model.

Setting the PrimaryPartCFrame (function of the model), moves the Primary Part to the given CFrame, and keeps the offsets of all other parts the same, in relation to the PrimaryPart.
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 05:56 PM
Okay, so now it drops infront of the player, but it doesnt have the rotation.


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 05:58 PM
If your model is a truck, then have the base of the truck be the primary part.

If your model is a box, then have the bottom of the box be the primary part.

If your model is a cute lil baby gnome, then have the baby's towel be the primary part.


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Oct 2016 06:00 PM
If you say thank you to everyone thats helped you so far, I'll continue to script it for you.

If you post your opinion on these two threads, I would see that as you being nice to me like everyone that helped you so far was on this forum to you.

https://forum.roblox.com/Forum/ShowPost.aspx?PostID=199597696
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=199574759


Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2016 06:28 PM
Will post opinion soon. Making sure to thouroughly read the threads.
Thank you personally from Stiiky to:
WowGnomes - Awesome dude, really is helping and understands, very considerate.
WoolHat - Helpful, kind, and gives very direct answers.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image