Hello, I’ve been working on a creating a custom character, I have got this code to change the character position but I’m not sure how to change just one of the vector3 values (In this case, z) without changing the whole entire thing, while keeping the original values of x and y. Also this is in a script. Here is the code so far:
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.W then
script.Parent.Char.Position = -- where I'm stuck
end)
Also if it is a character, position is not a valid member of model so you can use a primary part to move the whole model.
Char:SetPrimaryPartCFrame(CFrame Value)
thanks, This was exactly what I was thinking of but in a multiplayer racing game! But how do you remove the character since, the character runs next to the sphere.