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

How can I get this script to disable the smoke?

Asked by 7 years ago

Heres the code:

flex = script.Parent.WINGS_FLEX
straight = script.Parent.WINGS_STRAIGHT
wing = script.Parent.Parent.Smokee
winglet1 = script.Parent.Parent.Wingl.winglet.Smoke
winglet2 = script.Parent.Parent.Wingl.winglet1.Smoke

while wait() do
  local c = flex:GetChildren()
  local d = straight:GetChildren()
  local e = Smokee:GetChildren()
  local f = winglet1:GetChildren()
  local g = winglet:GetChildren()
  for i = 1, #c do 
  if script.Parent.Parent.SENSOR.Position.Y >= 22 then
  c[i].Transparency = 0
  d[i].Transparency = 1
  f[i].Enabled = 1
  script.Parent.Value.Value = true
  else
  c[i].Transparency = 1
  d[i].Transparency = 0
  script.Parent.Value.Value = false
  end
 end
end

I'm trying to get the smoke ENABLED (ON) when 7 >= 22, but is it enabled = 1? Or should I say something else other than f[i].Enabled = 1?

0
WTF do you mean when 7 > 22, that doesn't make any sense AT ALL FlaminSparrow 65 — 7y
0
I meant Y >= 22, not 7 >=22, Line 14 VirtualFlying 55 — 7y

1 answer

Log in to vote
0
Answered by
Jephi 42
7 years ago

f[i].Enabled = false

Enabled is a boolean (true/false value)

Ad

Answer this question