Hello! I was making CFrame script which makes part be facing toward local player’s humanoidrootpart. In short the part has certain position, but it changes its rotation when player moves. Here is the script i wrote:
local player = game.Players.LocalPlayer local character = player.Character local part = game.Workspace.Part local hum = character:WaitForChild("HumanoidRootPart") local partpos = Vector3.new(-0.58, 7.769, -10.775) local parttarpos = hum.Position while wait() do part.CFrame = CFrame.new(partpos, parttarpos) end
But when I launch test, part just stuck its front side to the top like this:
How to make it change its rotation by player moving?
Also for CFrame script I used this roblox article.