Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i script a moving block?

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?

1 comment

0

Thanks. That covered movement but what about rotation?

2 answers

✓ Accepted answer
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

4 comments

0

can u paste the whole script

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

0

i made a quick script its like yours but try mine it should work

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.