Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How to go about Moving Models?

Asked by 9 years ago

I have tried this in every way I can think of, and all it does is go straight to the script's parent instead of the position, ive Tried bomb.CFrame = Crame.new, bomb.Position = CFrame.new, bomb.Position = Vector3.new. And a few others.

while true do
    wait (3)
    bomb = game.Workspace.Bomb:Clone()
    bomb.Parent = game.Workspace
    bomb.Position = Vector3.new(0,0,0)
    bomb.Anchored = false
end

It also wont unanchor as I'm telling it to, and the output doesn't say anything about it

0
I've tested the script myself, and it worked fine. When you say it goes to the script's Parent, what do you mean? Shawnyg 4330 — 9y
0
the script it self is inside of an npc, and the clone never goes where i tell it to, it just goes to the npc's torso BSIncorporated 640 — 9y
0
try making bomb a local variable YellowoTide 1992 — 9y
0
Hm. Is the "bomb" a model? Shawnyg 4330 — 9y
View all comments (3 more)
0
is Bomb an explosion? alphawolvess 1784 — 9y
0
@Yellow, ive done that, and it didnt work. @Shawn,alpha No, Bomb is a part w/ damage script. BSIncorporated 640 — 9y
0
Maybe you're not referencing it correctly. Is there a space in the name, maybe? Does it start with a capital or lowercase? aquathorn321 858 — 9y

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

Well, from the qusetions that myself and another script have asked, I'm guessing that "Bomb" is a model. If so, you'd need to use MoveTo.

while true do
    wait (3)
    bomb = game.Workspace.Bomb:Clone()
    bomb.Parent = game.Workspace
    bomb:MoveTo(Vector3.new(0,0,0))
    for i,v in pairs(bomb:GetChildren()) do
        v.Anchored = false
    end
end
Ad

Answer this question