Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

my script is not working properly help ?

Asked by 6 years ago
Edited 6 years ago
1if game.Workspace.flag == BrickColor.new("Bright blue") then game.Workspace.door.Transparency = 1
2game.Workspace.door.CanCollide = false
3else game.Workspace.door.Transparency = 0
4game.Workspace.door.CanCollide = false end
5 
6--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
0
Try adding a function at the start. stock458 51 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Not sure if it will work.

01repeat wait()
02    game.Workspace.door.CanCollide = false
03 
04 
05game.Workspace.door.Transparency = 1
06game.Workspace.door.CanCollide = false
07until game.Workspace.flag.BrickColor ~= BrickColor.new("Bright blue")
08 
09repeat wait()
10    game.Workspace.door.CanCollide = false
11 
12 
13game.Workspace.door.Transparency = 0
14game.Workspace.door.CanCollide = true
15    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.

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 andreww1234 4 — 6y
Ad

Answer this question