Why output saying: attempt to index nil with ‘Name’ (8-th line)
script.Parent.runCommand.Event:Connect(function(cmd:string)
local split = cmd:split(" ")
print(split[1] .. "///" .. split[2] .. "///" .. split[3])
if split[1] == "function" then
if split[2] == "openapp" then
local appname = split[3] .. ""
local gui:ScreenGui = script.Parent.Parent.Parent.Parent:FindFirstChild(appname)
print(gui.Name)
gui.Enabled = true
end
end
end)
Oh it’s my error. Turns out it finding not in playergui, its finding in players.
But i see it due to WaitForChild() output (Infinite yield possible on ‘Players:WaitForChild(“TSUI”)’)