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?
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)
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)