Hello
I am currently attempting to make a 3D Map that shows players location inside a parts bounding box/area, while I was able to figure out how to get the part to attach to this part I couldn’t find any examples of keeping the CFrame movements within the part itself. I am also having an issue of the CFrame movements being inverted to what the player is doing, so if you jump the part goes down instead of up.
As you can see in this video the object is attached to the desired brick but not within the brick itself. And the movements are reversed.
This is my code so far.
local function MovePlayer(Player, Position)
for i, P in pairs(MapFolder.PlayersPart:GetChildren()) do
-- P is a part created and assigned to each player on joined
if P.Name == Player.Name then
--Position = Position
P.CFrame = CFrame.new(Position):ToObjectSpace(MapFolder.MapBox.MapPart.CFrame)
end
end
end
If you need more information please feel free to ask, otherwise thanks for reading.