Hello! I made a check for my module script and I ran it via a serverside script. I was wondering why it states that the GUI isn’t a child of PlayerGui yet it shows up on my screen? I ran a script to get all of my PlayerGui’s and it says only Free Camera is there.
https://gyazo.com/c1b29ee74d89cacdc5dc01485b9f6236
https://gyazo.com/1c98bbff6391f3c0fb18a301f6fe6ed6.gif
ws = game:GetService("Workspace")
objects = ws:FindFirstChild("DroppedObjects")
radius = 10
function checks(player,target,vtype)
print(player.Name)
if target then
if (target.Position - ws:WaitForChild(player.Name).HumanoidRootPart.Position).magnitude <= radius then
if target:IsDescendantOf(objects) then
if vtype == 'guiCheck' then
if player.PlayerGui.ItemDetection.Message.Visible == true then
return true
else
return false
end
else
return true
end
else
return false
end
else
return false
end
end
end
return checks
Notice | This script works in testing mode!