This is my script that i’m using
local screenGui = script.Parent
local minimapFrame = screenGui:WaitForChild("Minimap")
local directionArrow = minimapFrame:WaitForChild("DirectionArrow")
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local humanoid = char:WaitForChild("Humanoid")
local currentCamera = Instance.new("Camera")
currentCamera.FieldOfView = 60
currentCamera.CameraType = Enum.CameraType.Attach
currentCamera.CameraSubject = hrp
currentCamera.Parent = workspace
minimapFrame.CurrentCamera = currentCamera
for i, minimapObject in pairs(workspace.MinimapObjects:GetChildren()) do
minimapObject:Clone().Parent = minimapFrame
end
game:GetService("RunService").RenderStepped:Connect(function()
local camcframe = workspace.Camera.CFrame
local camrot = CFrame.Angles(0, hrp.Rotation.Y,0)
local camCFrame = CFrame.new(hrp.Position + Vector3.new(50, 25, 0), hrp.Position) * camrot
currentCamera.CFrame = camCFrame
directionArrow.Rotation = -hrp.Orientation.Y + 90
end)
The script makes the viewport camera go nuts, and it don’t rotate in Y axis at all, it rotates but it’s a mess
A video showing the problem: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.
i tried everything i know to make this work