Using FindFirstChild, FindFirstChildOfClass, WaitForChild, etc in studio with the Tool class for example (some other classes do the same its not exclusive to Tool) in certain locations will cause the “ViewportDisplaySize is not a valid member of GuiService” warning to appear if it returns something, if it returns nil then the warning wont appear
Script ran:
local services = {
game:GetService("Workspace"),
game:GetService("Players"),
game:GetService("Lighting"),
game:GetService("Workspace"),
game:GetService("MaterialService"),
game:GetService("ReplicatedFirst"),
game:GetService("ReplicatedStorage"),
game:GetService("ServerScriptService"),
game:GetService("ServerStorage"),
game:GetService("StarterGui"),
game:GetService("StarterPack"),
game:GetService("StarterPlayer"),
game:GetService("StarterPlayer").StarterCharacterScripts,
game:GetService("StarterPlayer").StarterPlayerScripts,
game:GetService("Teams"),
game:GetService("SoundService"),
game:GetService("TextChatService")
}
for _, service in services do
print(service.Name, service:FindFirstChildOfClass("Tool"))
end
Hi, thanks for reporting this! We haven’t been able to reproduce the issue. Could you check if there’s any code calling the ViewportDisplaySize API, especially in the Tool’s scripts? Also, if possible, please share the place file where you encountered the problem — that would help us debug it more effectively. Thanks!
Hi, sorry I realise I didn’t provide enough information for you to reproduce this bug properly.
The warning only appears (the item must exist) if you print or warnservice:FindFirstChildOfClass("Tool") for example.
This is not exclusive to just tools it happens to other things like a Script in MaterialService