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

I Am Making This Western Game And I Am Trying To Make A Cell Door Open?

So As You Can Tell By The Question.I Am Making A Western Game And If A Sheriff Catches A Theif Or Whatever Then The Sheriff Arrests Them And Tells Them To Come To The Cell.So I Want To make It Simple Instead Of Someone Having To Click It To Open (May Change That) So i Put Can Collide To False And Transparency To 4,But When I Test The Game,The Door Goes Transparent But Doesn't Let Me Walk Into The Cell which Is Meant To Happen When canCollide Is false.

Here It Is:

while true do
	wait(2)
	game.Workspace["Cell Door"].Transparency = 4
	wait(3)
	game.Workspace["Cell Door"].Transparency = 0
	wait(2)
	canCollide = false
	wait(2)
	canCollide = true
	wait(2)
end

1 answer

✓ Accepted answer

In your script, canCollide just acts as a variable as you do not specify it as the property of the door. Instead, similarly to how you did it with the transparency, you should do:

workspace["Cell Door"].CanCollide = false

and the same for setting it to true again.

1 comment

0

Thanks Man.It Works.Maybe I Need To Start Using Brackets And That In My Scripts Now.XD Anyways Again.It Works And THANK YOU!

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