|
So I am working on a tycoon and I want to make a dropper that drops out models, not just parts. But no matter how many times I change the script, it will either make it break or it will stay the same. So in a nutshell, I'm just trying to make a dropper that drops models. If you can help, that would be amazing. Thanks. |
|
jdogmad2Join Date: 2012-06-29 Post Count: 681 |
Did you try looking up how to do it on Youtube? |
|
SunXaoJoin Date: 2016-04-15 Post Count: 3761 |
cm=model:clone()
while wait(1) do
cm.Parent=game.Workspace
cm.Position=CFrame.new(script.Parent.Position)
end
This is very basic, hope it helped.
|
|
|
Where's the part in this script:
cm=model:clone()
while wait(1) do
cm.Parent=game.Workspace
cm.Position=CFrame.new(script.Parent.Position)
end
where you select your model you want to use? |
|
SunXaoJoin Date: 2016-04-15 Post Count: 3761 |
cm=(Your model location):clone()
|
|
|
+jdogmad2
Yes, I have. All I got was Tycoon Tutorials that I already watched and they said nothing about droppers dropping models. |
|
|
So this would work?
cm=game.Workspace.Modelname:clone() |
|
|
cm = Instance.new("Part")
while wait(1) do
cm.Parent=game.Workspace
cm.Position=CFrame.new(script.Parent.(Part Name).Position)
end
|
|
|
A model does not have a position because it's not a part inside workspace, you need to have a part inside a model to get the location of where it needs to be dropped.
For example:
If you had a part inside workspace
Workspace.Model.Part
You can say:
cm=Instance.new("Part)
while wait(1) do
cm.Parent=game.Workspace
cm.Position=CFrame.new(game.Workspace.Model.Part.Position)
end
|
|
|
cm=Instance.new("Part")
while wait(1) do
cm.Parent=game.Workspace
cm.Position=CFrame.new(game.Workspace.Model.Part.Position)
end
Amended ^ |
|
|
|
Now if you put a script INSIDE THE MODEL with the part also inside the model you could say:
cm=Instance.new("Part")
while wait(1) do
cm.Parent=game.Workspace
cm.Position=CFrame.new(script.Parent.Part.Position)
end |
|
SunXaoJoin Date: 2016-04-15 Post Count: 3761 |
AH, I knew I've done something wrong, this is the fixed version.
cm=model:Clone()
while wait(1) do
cm.Parent=game.Workspace
cm:MoveTo((where the dropper is located).Position)
end
|
|
|
SunXaoJoin Date: 2016-04-15 Post Count: 3761 |
It worked, even if he doesn't set a primarypart, I've tested this after you've said that.
|
|
|
How can I add that script into this one?
function fire()
local p = Instance.new("Part")
p.Position = script.Parent.Position
p.Size = Vector3.new(2,3,2)
p.BrickColor = BrickColor.new(26)
p.BottomSurface = 0
p.TopSurface = 0
p.Name = "TycoonBrick"
p.Parent = script.Parent
end
while true do
wait(1) --Alter Rate Of Drop
fire()
end
|
|
SunXaoJoin Date: 2016-04-15 Post Count: 3761 |
That is basically what I've done, but since I can't see the whole tycoon scripts I don't know what kind of detection it is using. No it will not work with that in any way.
|
|