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 5 years ago
Edited 5 years ago

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
0
Try adding a function at the start. stock458 51 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.

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 — 5y
Ad

Answer this question