I have a image of my map i created tho blender, the image size is (0, 514, 0, 514) The image is scale by (0.2, 0, 0.2,0) I have a frame that size is (0.3, 0, 0.3,0) of my screen, the mapImage scale in this frame Their is also a arrow in the middle of the screen! http://prntscr.com/i9uj5t
Here is my code that moves the map image base off player position! I think my code below might be off! i get a offset when resizing my screen to large
module.RenderMinimap = function(gui) local minimap = gui:WaitForChild("Minimap") local arrow = minimap:WaitForChild("ImageLabel") local mapImage = minimap:WaitForChild("Frame"):WaitForChild("ImageLabel") local player = players.LocalPlayer local character = player.Character or player.CharacterAdded:wait() local hrp = character:WaitForChild("HumanoidRootPart") runService:BindToRenderStep("OffScreenIndicator", Enum.RenderPriority.Camera.Value, function() local rot = module.ReturnRot() arrow.Rotation = (360 - math.floor(rot * 57.2)) - 180 local positionx = (minimap.AbsoluteSize.X - hrp.Position.X) - (mapImage.AbsoluteSize.X - minimap.AbsoluteSize.X/2) local positiony = (minimap.AbsoluteSize.Y - hrp.Position.Z) - (mapImage.AbsoluteSize.Y - minimap.AbsoluteSize.Y/2) mapImage.Position = UDim2.new(0, positionx, 0, positiony) end) end
How would i be able to fix this so when i size my screen it doesn't have a offset..