local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local part = workspace.VoicesPart -- set this to the location of the part
local speed = 5 -- Adjust the speed
RunService.RenderStepped:Connect(function(deltaTime)
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local playerPosition = player.Character.HumanoidRootPart.Position
local partPosition = part.Position
local direction = (playerPosition - partPosition).Unit
local newPosition = partPosition + direction * speed * deltaTime
part.CFrame = CFrame.new(newPosition, playerPosition)
end
end)
while true do
task.wait(0.1)
script.Parent.CFrame = CFrame.lookAt(script.Parent.Position,hrp.Position)
script.Parent.Position = script.Parent.Position + script.Parent.CFrame.LookVector * 2
for i,v in pairs(workspace:GetPartBoundsInBox(script.Parent.CFrame,script.Parent.Size)) do --ignore this part (its for hit detection)
if v == hrp then
hrp.Anchored = true
game.Players.LocalPlayer:Kick("VEhFWSBIQVZFIEZPVU5EIFlPVS4=")
end
end
end