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

I have script with CFrame, but how redo them to MoveTo?

Asked by 4 years ago

I want to redo this script to MoveTo, can anyone help? Becouse i dont know how do this... Script:

local plr = game:service("Players").LocalPlayer
local userinputservice = game:service("UserInputService")
local chest = workspace.Chests.LargeChest
_G.distance = 4
userinputservice.InputBegan:connect(function(inp)
   if inp.KeyCode == Enum.KeyCode.T then
       while wait() do
           for _,v in next, chest:GetChildren() do
               v.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.CFrame.X,plr.Character.HumanoidRootPart.CFrame.Y,plr.Character.HumanoidRootPart.CFrame.Z - _G.distance)
               v.HumanoidRootPart.Anchored = true
           end
       end
   end
end)

PS: Click view source to see all script, becouse website dont show to end!

0
plr.character:MoveTo()? (i might have got this wrong since im lazy at reading code) speedyfox66 237 — 4y
0
No, i need chest MoveTo local plr. How do this? Kalinka008 2 — 4y

Answer this question