The problem is that the circles here are supposed to position where the THUGS’ humanoidrootpart is but this happens:
SCRIPT:
userinputservice.InputBegan:Connect(function(input, gpe)
if gpe then return end
local playergui = player.PlayerGui
local detectivemode:ScreenGui = playergui:FindFirstChild("DETECTIVEMODE")
if input.KeyCode == Enum.KeyCode.T and db == true and detectivemode.Enabled == false then
db = false
task.delay(10, function()
db = true
end)
if detectivemode.Enabled == false then
detectivemode.Enabled = true
for _, v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Model") and string.find(v.Name, "THUG") and not game.Players:GetPlayerFromCharacter(v) or v:GetAttribute("Useful") == true then
local newworldpoint:Part = v:FindFirstChild("HumanoidRootPart")
local highlight = Instance.new("Highlight", v)
highlight.OutlineColor = Color3.fromRGB(255, 0, 4)
newwave = game.ReplicatedStorage.Wave:Clone()
newwave.Parent = detectivemode
newwave.AnchorPoint = Vector2.new(.5, .5)
runconnection = runservice.RenderStepped:Connect(function()
local vectorpoint:Vector2, onscreen = camera:WorldToScreenPoint(newworldpoint.Position)
if onscreen == true then
newwave.Position = UDim2.fromOffset(vectorpoint.X,vectorpoint.Y)
end
end)
task.delay(7, function()
detectivemode.Enabled = false
if newwave ~= nil then
newwave:Destroy()
end
if highlight ~= nil then
highlight:Destroy()
end
end)
end
end
end
end
end)