I kinda know what it is, but how do I fix it.
Basically I want to make a model 5 studs in front of my character. I used primary part esc but, it doesnt work.
tool = script.Parent player = game.Players.LocalPlayer tool.RequiresHandle = false wait(5) --ignore please head = player.Character.Head stair = game.ReplicatedStorage.PreviewStair stair.PrimaryPart = stair.PrimaryPart tool.Equipped:Connect(function(mouse) local part = game.ReplicatedStorage.TestPart part.Parent = game.Workspace game:GetService("RunService").RenderStepped:Connect(function() stair:SetPrimaryPartCFrame(head.Position + head.CFrame.LookVector * 5) ---error at this line end) end)
Thanks for help! Cheers.
tool = script.Parent player = game.Players.LocalPlayer tool.RequiresHandle = false wait(5) --ignore please head = player.Character.Head stair = game.ReplicatedStorage.PreviewStair stair.PrimaryPart = stair.PrimaryPart tool.Equipped:Connect(function(mouse) local part = game.ReplicatedStorage.TestPart part.Parent = game.Workspace game:GetService("RunService").RenderStepped:Connect(function() stair:SetPrimaryPartCFrame(head.CFrame+ head.CFrame.LookVector * 5)) stair.Parent = workspace ---error at this line end) end)
try that?
edit: FIXED IT