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

MoveTo doesn't allow Collisions?

Asked by 7 years ago

Basically I'm trying to make this model grow from the ground, but it doesn't collide so it just teleports to top.

local Pos = plr.Character.HumanoidRootPart.Position + Vector3.new(0, -40, 0) + plr.Character.HumanoidRootPart.CFrame.lookVector * 10

for i = 1, 20, 0.1 do
    newTycoon:MoveTo(Pos + Vector3.new(0,i,0))
    wait(0.01)
end

1 answer

Log in to vote
0
Answered by 7 years ago
local Pos = plr.Character.HumanoidRootPart.Position + Vector3.new(0, -40, 0) + plr.Character.HumanoidRootPart.CFrame.lookVector * 10

for i = 1, 20, 0.1 do
    newTycoon:SetPrimaryPartCFrame(Pos + Vector3.new(0,i,0)) --[[make sure primary part is set to the central part]]
    wait(0.01)
end

0
Alsom wait(.01) actually waits about .03. Use wait() instead Ethan_Waike 156 — 7y
0
I tried that earlier. The problem is CFrame can't do Vector3 You will always get "Unable to cast Vector3 to CoordinateFrame" YouSNICKER 131 — 7y
0
just do CFrame.new(Vector3 value) RubenKan 3615 — 7y
Ad

Answer this question