Script unable to see value instance

Hello, I currently have a local script, located in StarterGUI. The purpose is to set the active property of a SurfaceGUI in an aircraft to false for those that do not have the correct rank in my group. The aircraft gets spawned hence why the script needs to wait for it to exist.

local A320 = game.Workspace:WaitForChild("Model").A320NEO_LEAP
local GroupID = 5213712
local RankID = 5
local Player = game:GetService("Players").LocalPlayer

if Player:GetRankInGroup(GroupID) >= RankID then

	A320.Connect.Value.Active = false


end

The script is able to locate the model fine once it gets spawned however says

Connect is not a valid member of workspace.Model.A320NEO_LEAP

when in fact it is, and I confirm this by viewing the workspace through Adonis DEX.
‘Connect’ is an ObjectValue which is set to the surfaceGUI

Thanks

3 Likes

did you try to do :WaitForChild To Connect ?

1 Like