if V:IsA("Folder") then
Clone.Icon.Image = "rbxassetid://"..Icons.Folder
elseif V:IsA("ValueBase") then
Clone.Icon.Image = "rbxassetid://"..Icons.Value
elseif V:IsA("Script") then
Clone.Icon.Image = "rbxassetid://"..Icons.Script
elseif V:IsA("LocalScript") then
Clone.Icon.Image = "rbxassetid://"..Icons.LScript
elseif V:IsA("ModuleScript") then
Clone.Icon.Image = "rbxassetid://"..Icons.MScript
elseif V:IsA("Frame") then
Clone.Icon.Image = "rbxassetid://"..Icons.Frame
else
Clone.Icon.Image = "rbxassetid://"..Icons.NoImage
end
THe line detecting if V is a script is detecting local and modules? how do i only detect for server scripts?
elseif V:IsA("Script") and not V:IsA("LocalScript") then
IsA is used also for inheriting classes: LocalScript | Documentation - Roblox Creator Hub
Use ClassName instead.
v:IsA("Script") means v is a server script. The general script detection is v:IsA("LuaSourceContainer") where LuaSourceContainer is a super class.
I would like to correct a little and add something to your statement.
“is A(“Script”)” also means “LocalScript”. Also superclass of server and local script can be “BaseScript”
NyrionDev
(Nyrion)
8
Well didn’t know that, thanks for correcting me.
system
(system)
Closed
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.