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

my script is not working properly help ?


if game.Workspace.flag == BrickColor.new("Bright blue") then game.Workspace.door.Transparency = 1
game.Workspace.door.CanCollide = false
else game.Workspace.door.Transparency = 0
game.Workspace.door.CanCollide = false end

--my goal is to have the door go invisible and cancollide=false when the flag is blue. when the flag is not blue to door goes back to it's old state 

1 comment

0

Try adding a function at the start.

1 answer

✓ Accepted answer

Not sure if it will work.

repeat wait() 
	game.Workspace.door.CanCollide = false


game.Workspace.door.Transparency = 1
game.Workspace.door.CanCollide = false 
until game.Workspace.flag.BrickColor ~= BrickColor.new("Bright blue")

repeat wait() 
	game.Workspace.door.CanCollide = false


game.Workspace.door.Transparency = 0
game.Workspace.door.CanCollide = true
	until game.Workspace.flag.BrickColor == BrickColor.new("Bright blue")





If it doesn't work then I recommend using remote events and making it a script. Just piece things together from the wiki if it doesn't work.

1 comment

0

Hey this is the guys you helped fix that script. i just want to say thank you you helped me alot and this truly shows me how good the roblox community is so thank you

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