|
| 13 Aug 2016 10:39 AM |
i got the CFrame to work but now when i add to thing to buy then if i buy the first stage and then i buy the secound stage then the secounds stage just clones on top of the other not forward the other stage i want it to be like it you buy like 5 normal stages and then buy a hard stage then the hard stage is gonna clone forward the latest stage you bought.
Here's the current script.
local JumpStage = game.ServerStorage.JumpStage local StupidNumber = 0 local Place = 2 function Clone() JumpStage:Clone().Parent = workspace JumpStage.Parent = workspace JumpStage:MoveTo(CFrame.new(0, 0, StupidNumber * 16).p) StupidNumber = StupidNumber + 1 Place = Place * 2 print(Place) script.Parent.PlaceNR.Value = 1 end script.Parent.MouseButton1Down:connect(Clone) |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 11:18 AM |
| CFrame is Really... Really... REALLY Glitched so You Need To Parent the Cloned Model to nil... Oh You Can Just Put the Stage on Workspace in the Position you Want, And Parent it to Lighting / ServerStorage |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 13 Aug 2016 11:25 AM |
CFrame is not "glitched". You're misleading him by pretending you know what you're talking about.
Instead of using MoveTo, set the PrimaryPart of the model and use SetPrimaryPartCFrame. JumpStage:SetPrimaryPartCFrame(CFrame.new(0, 0, StupidNumber*16))
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 11:41 AM |
| The SetPrimaryPartCFrame just gets a blue line |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 13 Aug 2016 11:45 AM |
JumpStage = game.ServerStorage:FindFirstChild'JumpStage' increment = 0 place = 2
script.Parent.MouseButton1Click:connect(function() JumpStage:Clone().Parent = workspace JumpStage:SetPrimaryPartCFrame(CFrame.new(0, 0, increment*16)) increment = increment + 1 place = place*2 -- what's the purpose of this? script.Parent.PlaceNR.Value = 1 -- and this? end)
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 13 Aug 2016 11:46 AM |
If your error is being caused because you have no set PrimaryPart, click on your Model in the explorer, go down to its properties, and designate the part.
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 01:14 PM |
| That is just a thing i tested |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 01:21 PM |
| Thanks, That workes but wat if i dont want the stage to clone inside eachother i want it to be like if i buy 2 Jump Stages and 3 LavaStages then the 2 jump stages clones but the 3 lavastages gets cloned a little bit forwards then the last jump stage you bought |
|
|
| Report Abuse |
|
|