Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

(User.Name) has no origin position?

Im trying to learn character teleporting and i keep getting an error message "Origin Position is not a valid member of model (User.Name)"

this is the local script inside a button in starterGUI

script.Parent.MouseButton1Click:Connect(function()
	local player = game.Players.LocalPlayer
	local Chara = player.Character or player.CharacterAdded:Wait()
	
	Chara["Origin Position"] = "15.336, 82.634, 11.484"
end)

1 answer

✓ Accepted answer

You can't get the Origin Position and Origin Orientation of a model. Instead, edit its pivot's position. Also, when changing a position, use Vector3 and not a string.

Chara:PivotTo((Chara:GetPivot() - Chara:GetPivot().Position) + Vector3.new(15.336, 82.634, 11.484))

4 comments

0

Thank you, im a beginner script so could you please explain what PivotTo and that stuff, it doesnt have to be a super detailed explanation i just wanna know for later reference

0

PivotTo is basically like SetPrimaryPartCFrame, except that you don’t need to set rhe primary part, and you can edit the pivot. It can be used when teleporting Parts/Models, moving and rotating.

0

If this answer really helpful and it solved your problem, please accept my answer so other people can see it too :)

0

This discussion is preserved as it was. New answers, comments, and votes are closed.