Hey devs,
I am currently making a simple system to make a model move in random places, it works fine. The only problem is that I set the height to 10 studs, but the model still stays on the ground… I tried playing around with the anchor settings but it didn’t change anything. What can I do to fix it ?
local Dummy = script.Parent
local Humanoid = Dummy:WaitForChild("Humanoid")
while true do
Humanoid:MoveTo(Vector3.new(math.random(-50,50),10,math.random(-50,50)))
repeat wait() until Humanoid.MoveToFinished
wait(math.random(1, 10))
end
Humanoid.MoveTo commands walking, and you can’t hover-walk. He will walk to the X and Z coordinates but remain on the ground. If you tell me exactly how you want it to behave (i.e. leaping, floating, frozen in place, launching towards the position, etc etc) then I will give some suggestions on how to do what you want.
local TweenService = game:GetService("TweenService")
while true do
local goal = {}
goal.Position = Vector3.new(math.random(-50,50),10,math.random(-50,50))
local timeG = math.random(3, 10)
local info = TweenInfo.new(timeG)
local Tween = TweenService:Create(script.Parent.HumanoidRootPart, info, goal)
Tween:Play()
wait(timeG+math.random(1, 10))
end
and for some reason, its deleting the HumanoidRootPart which is really strange (also this isn’t exactly a roblox character, its a butterfly with a humanoid and HumanoidRootPart)
wait forgot to show these, they are jointed to the HumanoidRootPart with Motor6D, also now for some reason even without the script its deleting everything in the model appart for the Humanoid, help pls
local Dummy = script.Parent
local Humanoid = Dummy:WaitForChild("Humanoid")
local HMR = Dummy:WaitForChild("HumanoidRootPart")
while true do
Humanoid:MoveTo(Vector3.new(math.random(-50,50),10,math.random(-50,50)))
local Position = HMR.Position
repeat
task.wait()
HMR.CFrame = CFrame.new(Position.X, 50, Position.Z)
until Humanoid.MoveToFinished
wait(math.random(1, 10))
end