hello! i made this script that when u click a player, it brings the player to the mouse position and updates the characters position when the mouse is moved. problem is, is that it glitches out when i click it. the character kinda hits the camera ig?
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local plr = Players.LocalPlayer
local char = plr.Character
local mouse = plr:GetMouse()
local rightArm = char["Right Arm"]
local rightShoulder:Motor6D = char.Torso["Right Shoulder"]
mouse.Button1Down:Connect(function()
local charac = mouse.Target.Parent
local otherplr = game.Players:GetPlayerFromCharacter(charac)
if otherplr then
RunService.RenderStepped:Connect(function()
local otherchar = otherplr.Character
for i, desc in otherchar:GetDescendants() do
if desc:IsA("BasePart") or desc:IsA("MeshPart") then
desc.CFrame = mouse.Hit
end
end
end)
end
end)