#how do you lock a part's position on only certain axes?
17 messages · Page 1 of 1 (latest)
pardon
** You are now Level 2! **
if you use vector 3 as a movement system if the player moves the y axis from its origin point it tps it back
when u say lock, i assume u wouldn’t want to move the part in that certain axis; just set the axis u want the player to move in:
part.Position = part.Position + Vector3.new(0,0,-5)
this is if u want to set only the z axis, i’m on mobile now so it’s a little hard to go more in depth
** You are now Level 8! **
part:ApplyImpulse(Vector3.new(0, workspace.Player:GetAttribute("FlapPower"), 0))
end
local function Die(collision)
if(collision.Name == "Kill") then
workspace.Player:Destroy();
end
end
game:GetService("ReplicatedStorage"):WaitForChild("Flap").OnServerEvent:Connect(ServerFlap);
workspace.Player.Touched:Connect(Die);
im using applyimpulse
basically when it goes up and falls it rotates sometimes and moves on the x or z axis
i'm trying to only get the y position to change, but keep the x and z position the same
basically when you press space it's applying 350 y impulse
and it sometimes flies off
i'm trying to make it so it won't rotate or move on the x or z axes when it lands