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

part doesn't move or print?

everything is in the tool

local Vector = script.Parent.Parent.Value.Value

if script.Parent.Parent.Value2.Value == true then
	while true do
		wait()
		print("hi")
		script.Part.Position = script.Part.Position + Vector3.new(Vector.X, Vector.Y, Vector.Z)
		print("hi")
		if script.Parent.Value2.Value == false or wait(5) then
			script.Parent.Parent.Value2.Value = false
			script.Part.Transparency = 1
			break
		end
	end
end

1 comment

0

You're trying to move a part from a local script. This technically should be handled on the server unless you are wanting to only move it for the client to see.

1 answer

If you use the wait function as an condition it will be considered true and as you have an or parameter in line 9 it will only execute your code once, wait 5 seconds and then break your while in line 12

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