I'm making an intro GUI where the camera rotates around the baseplate, and for the most part it works, although it won't stop rotating.
Notes;
--Using Filtering Enabled
--Local Script
--The for loop works though..
local target = workspace.Baseplate
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
local angle = 0
local stillPlay = true
local about = false
function play()
stillPlay = false
end
function about()
about = not about
if about then
script.Parent.AboutFrame:TweenPosition(UDim2.new(10, 0,0, 0))
else
script.Parent.AboutFrame:TweenPosition(UDim2.new(1, 0,0, 0))
end
end
function doStuff()
repeat
wait()
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0, angle, 0)
* CFrame.new(0, 200, 500)
angle = angle + math.rad(1)
until not stillPlay
wait(.5)
camera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
camera.CameraType = "Custom"
for i = 0.1,2,0.05 do
script.Parent.BackgroundTransparency = i
script.Parent.Play.BackgroundTransparency = i
script.Parent.Play.TextTransparency = i
script.Parent.About.BackgroundTransparency = i
script.Parent.About.TextTransparency = i
script.Parent.AboutFrame.BackgroundTransparency = i
wait()
end
end
if game:GetService("UserInputService").KeyboardEnabled then
script.Parent:WaitForChild("Play").MouseButton1Click:connect(play)
script.Parent:WaitForChild("About").MouseButton1Click:connect(about)
else
script.Parent:WaitForChild("Play").TouchTap:connect(play)
script.Parent:WaitForChild("About").TouchTap:connect(about)
end
doStuff()
