Log in to vote

Why isnt my script moving the entire dummy?

Asked by 25 days ago

Ok so in my game i have a script that moves a monster when the game starts which is currently just a dummy. But when i tell my script to move the HumanoidRootPart it only moves the actual HumanoidRootPart and not the entire body as it should. Does anyone know why this is?

There is no error's in the console.

ServerScript that moves the dummy

local map = workspace.Map.Value
local Map = workspace:FindFirstChild(map)

if not Map then
    print("could not find requested map : ".. map)

local MonsterSpawn = Map:WaitForChild("monsterSpawn"):GetChildren() -- gets all the possible spawnlocations
local randomMonsterSpawn = MonsterSpawn[math.random(1, #MonsterSpawn)] -- Chooses a random spawnlocation
local Monster = game.ServerStorage.grandiosav5

Monster.Parent = workspace
Monster.HumanoidRootPart.Position = randomMonsterSpawn.Position -- moves the monster (issue is located here)
thats the whole code? Xyternal 145 — 25d

2 answers

Log in to vote
Answered by 25 days ago

If you want to move an entire model you have to use :MoveTo(). Here is the Roblox Api Reference to it:

For example, in your case it would be:


Hope this helps.

This worked thank you <3 grandiosav4 62 — 25d
Log in to vote
Answered by
Xyternal 145
25 days ago

Have you tried using path Finding services before? If I am correct, then you can use path Finding services to get to your desired location

Answer this question