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 » Scripting Helpers
Home Search
 

Re: Car spawn in front of player

Previous Thread :: Next Thread 
CrownOfThornes is not online. CrownOfThornes
Joined: 26 Sep 2013
Total Posts: 138
13 Oct 2013 12:57 PM

Hi so i got this far but i cant get it to spawn in front of player. do i use body pos






player = script.Parent.Parent.Parent.Parent.Parent
money = player.leaderstats.Money
price = 0 --Put the items price here
tool = game.Lighting:findFirstChild("BugattiVeyron")

function buy()
if money.Value >= price then
money.Value = money.Value - price
local a = tool:clone()
a.Parent = player.Backpack
local b = tool:clone()
b.Parent = player.StarterGear

end
end
script.Parent.MouseButton1Down:connect(buy)
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
13 Oct 2013 12:59 PM
Position the car with the player Torso's lookVector.
Report Abuse
CrownOfThornes is not online. CrownOfThornes
Joined: 26 Sep 2013
Total Posts: 138
13 Oct 2013 01:02 PM
Could you help its not working :(
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
13 Oct 2013 01:05 PM
Example:

car = Car:Clone()

car.Parent = Workspace
car.Position = player.Torso.Position + Vector3.new(player.Torso.CFrame.lookVector)



This won't actually work, it's just an example of what you would do.
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
13 Oct 2013 01:12 PM
well he did say car, so id assume that its a model so you would probably wanna use the :MoveTo(part.position, part) method
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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