oh, its in module script, here is the function that is character rotating is stored in
`main.WhileLoop = function(player)
while task.wait(0.05) do
main.NextPosition(player)
local playersPlace : Part --finding the current place part the player is in rn
for i, placePart in Places:GetChildren() do
if placePart.Place.Value == player.Other.CurrentPlace.Value then
playersPlace = placePart
end
end
player.Character:PivotTo(CFrame.new(player.Character.HumanoidRootPart.Position) * playersPlace.CFrame.Rotation)
end
end`
and here is player moving function
local place
local price = MoneyByPlace.SecondPlaceCost / (MoneyByPlace.DecreaseCost * player.Other.CurrentPlace.Value)
if gamepassVal then
for i, placePart in Places:GetChildren() do
if placePart.Place.Value == player.Other.CurrentPlace.Value - 1 then
place = placePart
end
end
else
for i, placePart in Places:GetChildren() do
if placePart.Place.Value == player.Other.CurrentPlace.Value - 1 then
if player.Other.Money.Value >= price then
place = placePart
end
end
end
end
if place then
player.Other.CurrentPlace.Value -= 1
task.spawn(function()
local prevOccupant = workspace:FindFirstChild(place.Occupant.Value)
player.Character.Humanoid:MoveTo(place.Position)
player.Other.Money.Value -= price
place.Occupant.Value = player.Name
if prevOccupant then
prevOccupant.Humanoid:MoveTo(playersPlace.Position)
playersPlace.Occupant.Value = prevOccupant.Name --this will be another player in the future!!
end
end)