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

?`~Launch Pad Help~`?

Okay, what I'm trying to do is make one of those Hunger Games launch pads, I've tried so many things but the platform will not go back down to it's starting position. Does anybody know why or what I can add to make the script successful?

This first script works going up, but it does not come back down.

local deb = false

script.Parent.Touched:connect(function(part)
if deb then return end
deb = true
local h = part.Parent:FindFirstChild("Humanoid")
if h~=nil then
for i = 1, 445 do 
wait(0.01)
script.Parent.CFrame = CFrame.new((script.Parent.CFrame.x), (script.Parent.CFrame.y+0.1), (script.Parent.CFrame.z))
end
wait(2)
end
end)

I've tried adding to the script, like so:' This is the second half of the same script, I just added to it.

script.Parent.CFrame = CFrame.new((script.Parent.CFrame.x), (script.Parent.CFrame.y+0.1), (script.Parent.CFrame.z))
end
wait(2)
script.Parent.CFrame = CFrame.new((script.Parent.CFrame.x), (script.Parent.CFrame.y-0.1), (script.Parent.CFrame.z))
wait(2)
end
end)

But it's not working, any ideas?

2 answers

✓ Accepted answer

Here's a script that also brings the platform down:

local deb = false

script.Parent.Touched:connect(function(part)
	if deb then return end
	deb = true
	local h = part.Parent:FindFirstChild("Humanoid")
	if h ~= nil then
		for i = 1, 445 do
			wait(0.01)
			script.Parent.CFrame = CFrame.new((script.Parent.CFrame.x), (script.Parent.CFrame.y + 0.1), (script.Parent.CFrame.z))
		end
		wait(2)
		for i = 1, 445 do
			wait(0.01)
			script.Parent.CFrame = CFrame.new((script.Parent.CFrame.x), (script.Parent.CFrame.y - 0.1), (script.Parent.CFrame.z))
		end
	end
	-- Set it to false, so the platform could go up again
	deb = false
end)

2 comments

1

If this helped, please accept this as the answer.

0

Sorry about the really, late, response.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		hit.Parent.JumpPower = PUTAMOUNTHERE
		hit.Parent.Jump = true
		wait(1)
		hit.Parent.JumpPower = 50
		hit.Parent.Jump = false
	end
end)

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