Hey i am new to scripting and i try to make a block(part ) to follow you just a little bit behind like 5 studs but i cant figure it out in anyway.
function onPlayerEntered(player) player.CharacterAdded:connect(function(char) while wait() do script.Parent.CFrame = CFrame.new(char.Torso.Position) end end) end
game.Players.PlayerAdded:connect(onPlayerEntered)

1 comment
Sorry for the code block thing but youre code wont work it gives me the error 20:14:40.101 - Workspace.Part1.Script:2: attempt to index field 'Character' (a nil value)