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

How Do You Make A Script That Moves A Part From One Place To Another?

So Far I Have Got This Code:

--All Scripts Are Made By JamiethegreatQ777


enabled = true
--When Touched
function onTouched()
	wait(2)
end
	if not enabled then return end
	enabled = false
	game.Workspace.ClickToAppear
	p.Position = 487.878, 30.6, -65.445
	p.Size = Vector3.new(20,1,9)
	

It Won't Move The Part And It Says An Error At p.Position If I Could Please Help

1 answer

The Position of a PartInstance requires a Vector3 value.

Here's a remake I made of your script, hope this helps:

enabled = true

function onTouched()
	wait(2)
	if not enabled then return end
	enabled = false
	p.Position = Vector3.new(487.878, 30.6, -65.445)
	p.Size = Vector3.new(20,1,9)
end

p.Touched:Connect(onTouched)

2 comments

0

nice whitespace

0

But Can It Be Like Game.workspace.(partname)????

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