Hello, I’m not in Studio and have no access to it at the moment, yet I decided to write a Pick-up Script to Grab a Rifle laying on the Ground, then place it on your Back, I would just like someone to let me know if there’s any potential issues, as well as helping me set the CFrames for the placement on the Back and Orientation
local Rifle = workspace:WaitForChild(“Rifle”) local ClickDetector = Rifle:FindFirstChild(“ClickDetector”) ClickDetector.MouseClick:Connect(function(Player) if (Player) then local Character = Player.Character or Player.CharacterAdded:wait() if (Character and Rifle) then local Torso = Character:FindFirstChild(“Torso”) if (Character and Rifle and Torso) then local Weld = Instance.new(“Weld”) Rifle.CFrame = Torso.CFrame * CFrame.new(Back Vector) * CFrame.Angles(Orientation Vector) Weld.Part0 = Torso Weld.C0 = Torso.CFrame:Inverse() Weld.Part1 = Rifle Weld.C1 = Rifle.CFrame:Inverse() Weld.Parent = Rifle end end end end)
Thanks!