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

I do not know the respect in which this movement script is outdated?

Asked by 5 years ago

This is an old movement script I wrote way, way back. I am unsure of how block movement works now, so how would I write this script to make this object (a door, moving up or down) gradually move to the position I have designated it to move to? All the tutorials I have looked up only show me how to teleport an object to a location, not actually make it 'move'.

function boop(Player)

if game.Workspace.Items.DoorRemote.Value == true then

script.Parent.CanCollide = false

wait(0.1)

script.Parent.Position = Vector3.new(-14, 6, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 7, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 8, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 9, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 10, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 11, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 12, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 13, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 14, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 15, -53)

wait(0.1)

script.Parent.Position = Vector3.new(-14, 16, -53)

wait(0.1)

end

if game.Workspace.Items.DoorRemote.Value == false then

if not Player.PlayerGui:FindFirstChild("Doormsg1") then

local gui = script.Doormsg1:clone()

gui.Parent = Player.PlayerGui

gui.Frame.Script.Disabled = false

end

end

end

script.Parent.ClickDetector.MouseClick:connect(boop)

0
Theres part.Position, part.CFrame and theres tweenservice. Idk how it works because i dont use tween service anymore. SoftlockedUnderZero 668 — 5y
0
CFrame or TweenService. Using Vector3 matrices doesn't make it smooth. DeceptiveCaster 3761 — 5y

Answer this question