Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does my ghost dosen't move side by side?

So the title just says everything. It says that move (bodyposition is actually named move) is not a vaild member of part. Here is the script:

-- locals
local model = script.Parent
local ghost = model.Ghost
local one = model.movetoone
local two = model.movetotwo
------------------------------


--script
one.Transparency = 0
two.Transparency = 0
while true do
	ghost.move = one.Position
	wait(2)
	ghost.move = two.Position
	wait(2)
end
-- MOVE IS THE BODYPOSITION AND GHOST IS THE GHOST THAT MOVES

3 comments

1

Add a wait(1) to the top of the script

0

Or use the MaxForce to push you to the .Position of one.Position with using vector of course and then do the opposite.

0

/;yougottols can you explain? what do i have to set the max force to?

1 answer

✓ Accepted answer

There were one or two errors. Here's a fixed version:

local model = script.Parent
local ghost = model:WaitForChild("Ghost") -- Use WaitForChild to prevent the script from running before things load
local one = model:WaitForChild("movetoone")
local two = model:WaitForChild("movetotwo")

one.Transparency = 0
two.Transparency = 0
local move = ghost:WaitForChild("move");
while true do
    move.Position = one.Position -- You have to set move.Position, not just move.
    wait(2)
    move.Position = two.Position
    wait(2)
end

1 comment

0

Wow, you actually figured the problem after a few hours, im going to accept this answer if it will be correct!

This discussion is preserved as it was. New answers, comments, and votes are closed.