|
| 02 Jun 2015 01:17 AM |
this is inside a frame, i tried normal script, and local. its not making the frame invisible: THERES ONLY THOSE 3 ITEMS
local object = script.Parent;
while true do if #object:GetChildren() == 3 and object:FindFirstChild("Background") and object:FindFirstChild("Detector") and object:FindFirstChild("Script") then -- This script object.Visible = true else object.Visible = false end wait() end
|
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 02:29 AM |
Do individual checks and use prints. You probably mis-cased one of the strings you deliberately create every wait()...
|
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 12:55 PM |
b1
I don't understand... explain please |
|
|
| Report Abuse |
|
|
Pkamara
|
  |
| Joined: 25 Apr 2013 |
| Total Posts: 95 |
|
|
| 02 Jun 2015 01:39 PM |
First of all that code is inefficient but anyway,
local Object = script.Parent;
while wait() do if #Object:GetChildren() == 3 and Object:FindFirstChild("Background") and Object:FindFirstChild("Detector") and Object:FindFirstChild("Localscript") then Object.Visible = true; else Object.Visible = false; end;
~ Mathematical Dessert |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 01:53 PM |
| inefficient? Then how do i make it efficient? |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 01:58 PM |
b2
ok my new script:
local Object = script.Parent;
while true do if #Object:GetChildren() == 3 and Object:FindFirstChild("Background") and Object:FindFirstChild("Detector") and Object:FindFirstChild("Localscript") then Object.Visible = false; print("hi1") else Object.Visible = true; print("hi2") end wait() end;
>>hi2 >>hi2 >>hi2 >>hi2 >>hi2 >>hi2 >>hi2 >>hi2 (etc.) |
|
|
| Report Abuse |
|
|