So i've been working with the CFRAME moving and etc, here's my current script.
function added()
script.LocalScript:clone().Parent = player.CharacterAdded:wait()
end
local target = workspace.cam
local camera = workspace.CurrentCamera
camera.CameraSubject = target
local angle = 0
while wait() do
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(0, angle, 5) --Rotate by the angle
* CFrame.new(0, 0, 5) --Move the camera backwards 5 units
angle = angle + math.rad(1)
end
game.Players.PlayerAdded:connect(added)
Now i need it so that it will check if the player has already been playing, i was thinking a leaderstat value (hidden one) that it checks and if it's below 1 then it will not display the gui. The reason why this is big is because if they click "play" they get teleported to the default spawn location.
Here's the button "click" function.
function onClicked()
game.Players.LocalPlayer.PlayerGui.Menu.Frame.Size = UDim2.new(0, 170, 0, 100)
game.Players.LocalPlayer.PlayerGui.Menu.Play.Size = UDim2.new(0, 150, 0, 100)
game.Players.LocalPlayer.PlayerGui.Menu.Play.Text = "Loading.."
wait(1)
game.Players.LocalPlayer.PlayerGui.Menu.Frame.Size = UDim2.new(0, 180, 0, 100)
game.Players.LocalPlayer.PlayerGui.Menu.Play.Text = "Loading..."
wait(1)
game.Players.LocalPlayer.PlayerGui.Menu.Frame.Size = UDim2.new(0, 190, 0, 100)
game.Players.LocalPlayer.PlayerGui.Menu.Play.Text = "Loading...."
wait(1)
game.Players.LocalPlayer.PlayerGui.Menu.Frame.Size = UDim2.new(0, 260, 0, 100)
game.Players.LocalPlayer.PlayerGui.Menu.Play.Text = "Finishing Assets"
wait(1)
game.Players.LocalPlayer.PlayerGui.Menu.Frame.Size = UDim2.new(0, 100, 0, 100)
game.Players.LocalPlayer.PlayerGui.Menu.Play.Text = "Enjoy!"
wait(3)
game.Workspace.Sound:Stop()
script.Parent.Parent:Destroy()
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"
local player = game.Players.LocalPlayer.Character.Torso
if player then
player.CFrame = CFrame.new(Vector3.new(-95, 18.9, -328))
end
end
script.Parent.MouseButton1Click:connect(onClicked)
I am going to try my own things but it may not work... Thanks in advanced!
