What do you want to achieve? Hello, Developers! I am inserting a part into the players character, but I can’t seem to figure out how to make it move with the player
What is the issue? The issue is that the part cloned and put into the players character doesn’t move with their character
What solutions have you tried so far? I looked on YouTube and the Developer Forum
In my script I have a part in ReplicatedStorage named “CameraPart” and I am cloning it and inserting it into the players character. The only thing is that the part doesn’t move with the character, it just stays were it spawned.
Here is my code:
local player = game.Players.LocalPlayer
local camera = game.ReplicatedStorage:WaitForChild("CameraPart")
function insertCamera()
local char = player.Character
camera:Clone()
camera.Parent = char
camera.CFrame = char.HumanoidRootPart.CFrame + Vector3.new(0,-.5,5)
camera.Anchored = true
camera.CanCollide = false
end
wait(1)
insertCamera()