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

How do I add smoke in this slide door script?

I made a slide door script where when you click it, it opens by sliding to the right (which you know). But I want the smoke with it to. Like movies, when they open something, smoke comes out and door opens. This is the script:

door = script.Parent.Parent.Door

function onClicked()
	for i = 1, 70 do
		door.CFrame = door.CFrame*CFrame.new(0.1, 0, 0)
		wait()
	end
	wait(3)
	for i = 1, 70 do
		door.CFrame = door.CFrame*CFrame.new(-0.1, 0, 0)
		wait()
	end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 answers

✓ Accepted answer

You can just do

door = script.Parent.Parent.Door
Instance.new("Smoke", door)

1 comment

0

Wow. I should have known that. Lol. Thanks bro.

I would suggest having an invisible, anchored, no collision part with a smoke object inside it with the enabled property set to false, then set that property to true when you want smoke and back to false when you don't. You can also edit the other properties of the smoke for the effect you want.

2 comments

0

Alright. Thank you bro.\

0

read my reply

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