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

How do i make a Vector3 that works move the brick that the script is a child of?

This is my code that doesn't work, but it looks fine

	script.Parent.MouseClick:Connect(function(player)
	 
    player.leaderstats.Power.Value = player.leaderstats.Power.Value + 1
		local model = script.Parent.Parent
		local endPosition = Vector3.new(-81.58, -73.922, -477.425) 
 
	
 
          wait(3)
				model:MoveTo(endPosition)
	end
)

The leaderboard part works, but not the Vector3. This script is in a clickdetector that the brck is the parent of.

1 answer

You could do

part:MoveTo(endPosition)

and delete line 4.

When you said “brck” I assume you refer to that as a part, right? Well, in your script it’s a model so we could just change model to part as seen above.

1 comment

0

The MoveTo() method is only for models, not parts

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