the scripts works fine but it clips the object halfway through an object and stops where the mouse is, how would i make the script respect parts collision instead of the mouse?
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local billBoardGui = script.Parent
local runService = game:GetService(“RunService”)
local isMoving = false
local movePart
local part = billBoardGui.Adornee
if not isMoving then isMoving = true
movePart = runService.RenderStepped:Connect(function()
mouse.TargetFilter = part
part.Position = mouse.Hit.Position
end)
else
movePart:Disconnect()
mouse.TargetFilter = nil
isMoving = false
end