|
| 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 |
|
|
|
| 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 |
|
|
|
| 18 Jun 2016 05:52 PM |
| Players.Player1.PlayerGui.CarDealerGui.Frame.Anim.Buy.LocalScript:14: unexpected symbol near '=' |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 05:57 PM |
| I'd need to see your entire script in order to use that error effectively. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|