Talk:One Way Shields: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker
Testing
>Chess123mate
No edit summary
Line 12: Line 12:
script.Parent.Touched:connect(onTouched)
script.Parent.Touched:connect(onTouched)
</pre> works.  {{User:Mindraker/sig}} 14:14, 23 August 2008 (CDT)
</pre> works.  {{User:Mindraker/sig}} 14:14, 23 August 2008 (CDT)
That script is inefficient. A person could get through it the other way with basic teamwork. To improve, you'd either put a mini-teleporter, or also add a door2.OnTouch function that anchors one or both of the doors. [[User:Chess123mate|Chess123mate]] 06:22, 3 November 2008 (UTC)

Revision as of 06:22, 3 November 2008

The script

door = script.Parent.Parent.Door
door2 = script.Parent.Parent.Door2
function onTouched(hit)
	door.CanCollide = false
	door2.CanCollide = false
	wait(3)
	door.CanCollide = true
	door2.CanCollide = true
end

script.Parent.Touched:connect(onTouched)

works. MINDRAKER 14:14, 23 August 2008 (CDT)

That script is inefficient. A person could get through it the other way with basic teamwork. To improve, you'd either put a mini-teleporter, or also add a door2.OnTouch function that anchors one or both of the doors. Chess123mate 06:22, 3 November 2008 (UTC)