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

How do i script a moving block?

Asked by 8 years ago

I have seen the ROBLOX tutorials on scripting moving blocks but with the new updates it doesn't work. Can someone give me a more updated version of this script?

0
Thanks. That covered movement but what about rotation? HackTheUniverse 50 — 8y

2 answers

Log in to vote
1
Answered by 8 years ago
local model = script.Parent
local platform = model.Platform
local start = model.Start
local finish = model.Finish
local bodyPosition = platform.BodyPosition
while true do
    bodyPosition.position = start.Position
    wait(6)
    bodyPosition.position = finish.Position
    wait(6)

end
0
can u paste the whole script thegamingpro566 0 — 8y
0
local model = game.Workspace.MovingPlatformModel local platform = model.Platform local start = model.Start local finish = model.Finish local bodyPosition = platform.BodyPosition while true do bodyPosition.position = start.Position wait(6) bodyPosition.position = finish.Position wait(6) end HackTheUniverse 50 — 8y
0
i made a quick script its like yours but try mine it should work thegamingpro566 0 — 8y
0
local model = script.Parent local platform = model.Platform local start = model.Start local finish = model.Finish local bodyPosition = platform.BodyPosition while true do bodyPosition.position = start.Position wait(6) bodyPosition.position = finish.Position wait(6) end thegamingpro566 0 — 8y
Ad
Log in to vote
0
Answered by
Dr_Doge 100
8 years ago

well this is one way u can Move stuff

part = Instance.new("Part",game.workspace) -- Change this to what/where the Part is
while wait() do
local X = part.CFrame.X
local Y = part.CFrame.Y+1
local Z = part.CFrame.Z
part.CFrame = CFrame.new(X,Y,Z)
end

That should work... Idk doe I just typed it from the top of my head...

Can someone help me with My question? https://scriptinghelpers.org/questions/24366/why-wont-this-save-script-work


well looking at ur script, Heres a fixed version of it...


local model = script.Parent local platform = model.Platform local start = model.Start local finish = model.Finish local bodyPosition = Instance.new("BodyPosition",platform) while true do bodyPosition.position = start.Position wait(6) bodyPosition.position = finish.Position wait(6) end

Answer this question