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

This is the most complex script I have ever made so far, but why will it not work?

All it is supposed to do is move a part named "Brick" up from a set position a fews times...but it won't work lol, help.

local Brick = script.Parent
function MoverTest()
	game.Workspace.Brick.Position = Vector3.new(-100.5, 80, 231)
	wait(0.5)
	game.Workspace.Brick.Position = Vector3.new(-100.5, 90, 231)
	wait(0.5)
	game.Workspace.Brick.Position = Vector3.new(-100.5, 100, 231)
	wait(0.5)
	end

1 answer

✓ Accepted answer

For one, you dont have to specify it as game.Workspace since you already have script.Parent. and you need to trigger the function.

If just once use

MoveTest()

If you want to link it to something else such as a clickdetector

Brick.ClickDetector.MouseButton1Click:connect(MoveTest)

I could be wrong but I believe that should work.

2 comments

0

Oh thanks! I toyed with a while true do loop and managed to get it working :P

0

Your very welcome.

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