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

platform not moving when you press the button?

So when you press the 2nd button in my game, its supposed to make this platform move up and down, but instead it stays still even when you press the button.

local part = script.Parent
local button = workspace.Button2.button2.scriptpart2
local e = 1
button.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild('Humanoid') then

		repeat wait() until button.Touched 
		while true do
			part.CFrame	= CFrame.new(36, script.Parent.CFrame.Y + 0.02 * e, -36)
			wait(0.02)
			if script.Parent.CFrame.Y > 20 then
				e = -1
				wait(3)
				if script.Parent.CFrame.Y < 3 then
					e = 1
					wait(3)
				end
		   end
		end	
	end
end)

1 answer

try to slowly increse the Y axis. Add 1 every 0.1 seconds or something. Good Luck!!!

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