Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Use(...)
- local args = {...}
- local nearestdistance = math.huge
- local nearestplayer
- for _, i in pairs(game.Players:GetPlayers()) do
- local distancecheck = i:DistanceFromCharacter(args[1].Torso.Position)
- if distancecheck < nearestdistance then
- nearestplayer = i
- nearestdistance = distancecheck
- end
- end
- local bg = Instance.new("BodyGyro")
- bg.Parent = args[1].Torso
- bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
- bg.CFrame = CFrame.new(args[1].Torso.Position, nearestplayer.Character.Torso.Position)
- wait(3) -- placeholder to show you it does the thing
- bg:Destroy() -- kill the facing so it doesnt walk around like that
- end
- return Use
Add Comment
Please, Sign In to add comment