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

How would I go about moving an entire model after another script is triggered?

It's sort of hard to explain, but I want to make one of those things that when you pull down on the trapped door, a ladder extends outwards for you to go into the attic. I have it to where if you press 'F' the trapdoor comes down, but I can't figure out how to make the second part extend like a ladder. I know it isn't much of a script, but I was wondering why this wasn't working. I tried to make it see when the main part is already rotated (after the trapped door opens) and then run a piece of the script to make the ladder come down.

local ladder = script.Parent
if script.Parent.MainPart.Position = Vector3.new(39.778,7.378,-12.766) then
	wait(.5)
	for i = 0,1,.001 do
		ladder:SetPrimaryPartCFrame(ladder:GetPrimaryPartCFrame() * CFrame.new(0,0,-i))
		wait()
end

Thanks!

2 comments

0

???

0

Sorry, I'm not the best at explaining. I may be doing this way too complicated than it should be done, but I made a basic CFrame script to open a door when you press E. There's a ladder connected to it that i want to extend after the player opens the door. Let me know if you have further questions

1 answer

Not enough information but here.

local ladder = script.Parent
if script.Parent.MainPart.Position = Vector3.new(39.778,7.378,-12.766) then
    wait(.5)
    for i = 0,1,100/10000 do
        ladder:SetPrimaryPartCFrame(ladder:GetPrimaryPartCFrame() * CFrame.new(0,0,-i))
        wait()
end

1 comment

0

Sorry, I'm not the best at explaining. I may be doing this way too complicated than it should be done, but I made a basic CFrame script to open a door when you press E. There's a ladder connected to it that i want to extend after the player opens the door. Let me know if you have further questions

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