✓ Accepted answer
The first problem:
The first problem is very strange and the HumanoidRootPart should be there, getting the RootPart from the property might work to fix this
The second problem:
You are trying to set the HumanoidRootPart to a CFrame when what you actually want is to set HumanoidRootPart.CFrame like shown below
The solution:
character = game.Players.LocalPlayer.Character script.Parent.MouseButton1Click:Connect(function()
character:FindFirstChildOfClass("Humanoid").RootPart.CFrame = CFrame.new(workspace.Respawn.Position)
end)
Wiki:
FindFirstChildOfClass
Humanoid.RootPart
Don't forget to mark my answer as the solution and upvote it if it answered your question :)
3 comments
Please use the codeblock feature for Lua code.
?
The codeblock feature in the editor. Also, please practice proper indentation when posting code.