Idea(This Is Just a section) The code creates a backdrop and focusing the camera on the backdrop, depending on if the value is active or inactive.
Problem The code is working... when the script goes through for the initial time when the server launches. I'm not sure how to solve this.
Code:
function updateBackdrop() local x,y = self.AbsoluteSize.X,self.AbsoluteSize.Y local cx,cy = math.floor(x/2),math.floor(y/2) local cz = GetDepthForWidth(40,x) local ratio = y/x local pos = ScreenSpaceToWorld(cx,cy,cz) backdrop.Size = Vector3.new(40,40*ratio,0) backdrop.CFrame = c.CoordinateFrame * CFrame.new(pos) if game.Workspace.v.Value == false then c.CameraType = "Scriptable" c.CoordinateFrame = CFrame.new(9999,9999,9999) if game.Workspace.v.Value == true then c.CameraType = "Follow" end end end updateBackdrop() rs.RenderStepped:connect(updateBackdrop)
** Thanks :D **
c.CameraType = "Follow"