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

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

Asked by 6 years ago
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

Log in to vote
0
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
6 years ago

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)
0
nice whitespace theCJarmy7 1293 — 6y
0
But Can It Be Like Game.workspace.(partname)???? JamiethegreatQ777 16 — 6y
Ad

Answer this question