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: Random Help !

Previous Thread :: Next Thread 
dadibox1234 is not online. dadibox1234
Joined: 05 Dec 2013
Total Posts: 320
18 Jun 2016 05:28 PM
local Position = workspace.CarDealer.Spawn.[[[[[[[[GET RANDOM SPAWN Spawn]]]]]]]]].Position




There have 3 Spawn in my model



Thank you !

Dadibox1234
Report Abuse
dylan1406599 is not online. dylan1406599
Joined: 30 Apr 2008
Total Posts: 197
18 Jun 2016 05:37 PM
local positions = {pos1, pos2, pos3}

game.--[[whereever its saved]]:Clone().Position = positions[math.random(1,#positions)]

can't really test it but that's the jist
Report Abuse
dadibox1234 is not online. dadibox1234
Joined: 05 Dec 2013
Total Posts: 320
18 Jun 2016 05:52 PM
Players.Player1.PlayerGui.CarDealerGui.Frame.Anim.Buy.LocalScript:14: unexpected symbol near '='
Report Abuse
dylan1406599 is not online. dylan1406599
Joined: 30 Apr 2008
Total Posts: 197
18 Jun 2016 05:57 PM
I'd need to see your entire script in order to use that error effectively.
Report Abuse
dadibox1234 is not online. dadibox1234
Joined: 05 Dec 2013
Total Posts: 320
18 Jun 2016 06:04 PM
Ok :



function onClicked()
local LimitValue = script.Parent.Parent.Limit.Value
local Limit = Instance.new("Model")
Spawn here -->> local Position = workspace.CarDealer.Spawn.
GET RANDOM --- >Spawn<---.Position
local cash = game.Players.LocalPlayer.leaderstats.Cash
local price = script.Parent.Parent.PriceAA.Value
local name = game.Lighting.CarDealer:WaitForChild(script.Parent.Parent.Carname.Value)

game.Players.LocalPlayer.PlayerGui.CarDealerGui.Frame.Anim.Visible = false
if cash.Value < price then
game.Players.LocalPlayer.PlayerGui.CarDealerGui.Sound.EnoughMoney:Play()
end

if cash.Value >= price then
game.Players.LocalPlayer.PlayerGui.CarDealerGui.Sound.Buy:Play()
cash.Value = cash.Value -price
Limit.Parent = game.Workspace
name:Clone().Parent = workspace
Limit:WaitForChild(script.Parent.Parent.Carname.Value):MoveTo (Position)

end
end
script.Parent.MouseButton1Down:connect(onClicked)


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