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: Spawn model from lighting to player with buy gui?

Previous Thread :: Next Thread 
poey27 is not online. poey27
Joined: 21 Jun 2008
Total Posts: 469
14 Nov 2013 08:09 PM
does anyone know how to spawn a model from lighting to a player?

if you do could you help i have this but it teleports to last place it was before it was in lighting....







local model = game.Lighting.Car
local Cash = game.Players.LocalPlayer.leaderstats.Cash
function onClicked()
if Cash.Value >= 50 then
Cash.Value = Cash.Value - 50
local c = model:Clone()
wait()
c.Parent = game.Workspace
c:MakeJoints()
end
end
script.Parent.MouseButton1Down:connect(onClicked)



how would i get this to spawn to local player that buys it?
Report Abuse
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
14 Nov 2013 08:27 PM

local model = game.Lighting.Car
local Cash = game.Players.LocalPlayer.leaderstats.Cash
function onClicked()
if Cash.Value >= 50 then
Cash.Value = Cash.Value - 50
local c = model:Clone()
wait()
c.Parent = game.Workspace
c:MakeJoints()
c:MoveTo(game.Players.LocalPlayer.Character.Torso.Position)
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(c.VehicleSeat.Position)
end
end
script.Parent.MouseButton1Down:connect(onClicked)

try that
Report Abuse
poey27 is not online. poey27
Joined: 21 Jun 2008
Total Posts: 469
14 Nov 2013 08:31 PM
Didn't seem to work =/
Report Abuse
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
14 Nov 2013 08:33 PM
Probably got something wrong, am tired.
Report Abuse
poey27 is not online. poey27
Joined: 21 Jun 2008
Total Posts: 469
14 Nov 2013 08:34 PM
My bad it does work!

Thank you so much!
Report Abuse
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
14 Nov 2013 08:36 PM
k

am genius even when tired
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