I have a script which toggles viewport on the item/food it is on however it’s extremely zoomed in is there an option to change this?
my script for it is
wait(.3)
local gui = game.Players.LocalPlayer.PlayerGui.ShopGuis.GersonShop
local fram1 = gui.Frame.ShopItemsDisplay.ViewportFrame
local Storage = game.ReplicatedStorage.CameraModels
local Items = Storage:WaitForChild("Foods")
script.Parent.MouseEnter:Connect(function()
local camera = Instance.new("Camera")
camera.Parent = script.Parent
fram1.CurrentCamera = camera
camera.CFrame = CFrame.new(Vector3.new(0,0,90))
local item1 = Items.SeaTea:Clone()
local PCF1 = item1.PrimaryPart.CFrame - item1.PrimaryPart.CFrame.Position
item1:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0,0,item1.ZPosPreview.Value)) * PCF1)
item1.Parent = fram1
end)
script.Parent.MouseLeave:Connect(function()
local item1 = fram1:WaitForChild("SeaTea")
local camera = script.Parent:WaitForChild("Camera")
item1:Destroy()
camera:Destroy()
end)
https://gyazo.com/b836c20ebda5bf248db90e322196fdd5
Help would be appreciated thank you!