Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

?`~Launch Pad Help~`?

Asked by 10 years ago

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

Log in to vote
1
Answered by
tambre2 25
10 years ago

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)
1
If this helped, please accept this as the answer. tambre2 25 — 10y
0
Sorry about the really, late, response. superroboraul 15 — 9y
Ad
Log in to vote
0
Answered by 5 years ago
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)

Answer this question