-
What do you want to achieve?
I want to make a a shop system like mining simulator -
What is the issue?
The script works perfectly, i’ve tried to print to see if the function fully run and it does, I’ve tried to check at runtime what the CurrentCamera.CFrame was and it’s always on scriptable. The CFrame just doesn’t want to change. I get no error in my output either -
What solutions have you tried so far?
Everything I said just above this message + talked with some people on discord and checked on the devforum but nothing seemed to work.
-- Tables
local easyCams = {
easyObbyCamerasToggle = {
[1] = easyObbyCam:WaitForChild("GrassLand"),
[2] = easyObbyCam:WaitForChild("TheCave"),
}
}
-- Variables
local isInUi = nil
local PartCF = 0
-- Functions
function ObbyCFrame.ChangeCams2(player: Player)
currentCamera.CameraType = Enum.CameraType.Scriptable
coroutine.wrap(function() -- don't mind this
while true do
task.wait()
print(currentCamera.CameraType)
end
end)()
local array = {easyCams.easyObbyCamerasToggle} -- array
local TweenTime = 0.5
PartCF += 1 -- index
for i = 1, #array, 1 do
while true do
task.wait(2)
local tween = tweenService:Create(currentCamera, TweenInfo.new(TweenTime), {CFrame = array[PartCF].CFrame})
tween:Play() -- tweening
tween.Completed:Wait()
end
end
end