Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with Camera Manipulation?

Asked by 8 years ago

So I've been trying to make my own simple opening with a ScreenGui, and the one problem I'm having is with the Camera Manipulation part.

This is the script to my intro,

local screenGui = Instance.new("ScreenGui")
screenGui.Parent = script.Parent

local text = Instance.new("TextLabel")
text.Parent = screenGui
text.Size = UDim2.new(0,10000,0,1000)
text.Position = UDim2.new(0,0,0,0)
text.BackgroundTransparency = 0.6
text.Visible = true

local text1 = Instance.new("TextLabel")
text1.Parent = screenGui
text1.Size = UDim2.new(0,200,0,50)
text1.Position = UDim2.new(0,590,0,15)
text1.Text = "Welcome to Salt Lake Stadium!"
text1.BackgroundTransparency = 1
text1.FontSize = Enum.FontSize.Size48
text1.Visible = true

local text3 = Instance.new("TextLabel")
text3.Parent = screenGui
text3.Size = UDim2.new(0,10000,0,1000)
text3.Position = UDim2.new(0,0,0,0)
text3.BackgroundTransparency = 0.6
text3.Visible = false

local text4 = Instance.new("TextLabel")
text4.Parent = screenGui
text4.Size = UDim2.new(0,200,0,50)
text4.Position = UDim2.new(0,590,0,15)
text4.Text = "Information"
text4.BackgroundTransparency = 1
text4.FontSize = Enum.FontSize.Size48
text4.Visible = false

local text5 = Instance.new("TextLabel")
text5.Parent = screenGui
text5.Size = UDim2.new(0,300,0,500)
text5.Position = UDim2.new(0,540,0,15)
text5.Text = "Welcome to Salt Lake Stadium 2.0! This stadium is the home of the Indian National Footbal Team! The team was established in July of 2015 and curently plays some of their games here!"
text5.FontSize = Enum.FontSize.Size24
text5.TextWrap = true
text5.BackgroundTransparency = 1
text5.Visible = false

local textButton = Instance.new("TextButton")
textButton.Parent = screenGui
textButton.Size = UDim2.new(0,200,0,50)
textButton.Position = UDim2.new(0,590,0,100)
textButton.Text = "Start"
textButton.FontSize = Enum.FontSize.Size18
textButton.Visible = true

local textButton2 = Instance.new("TextButton")
textButton2.Parent = screenGui
textButton2.Size = UDim2.new(0,200,0,50)
textButton2.Position = UDim2.new(0,590,0,200)
textButton2.Text = "About"
textButton2.FontSize = Enum.FontSize.Size18
textButton2.Visible = true

local textButton3 = Instance.new("TextButton")
textButton3.Parent = screenGui
textButton3.Size = UDim2.new(0,200,0,50)
textButton3.Position = UDim2.new(0,200,0,150)
textButton3.Text = "Back"
textButton3.FontSize = Enum.FontSize.Size18
textButton3.Visible = false




textButton.MouseButton1Down:connect(function()
    text.Visible = false
    textButton.Visible = false
    text1.Visible = false
    textButton2.Visible = false
end)

textButton2.MouseButton1Down:connect(function()
    textButton2.Visible = false
    text.Visible = false
    textButton.Visible = false
    text1.Visible = false
    text3.Visible = true
    textButton3.Visible = true
    text4.Visible = true
    text5.Visible = true
end)

textButton3.MouseButton1Down:connect(function()
    textButton3.Visible = false
    text3.Visible = false
    textButton.Visible = true
    text1.Visible = true
    textButton2.Visible = true
    text.Visible = true
    text4.Visible = false
    text5.Visible = false
end)

Since I'm new to Camera Manipulation, I'm using the simple rotate around a part script found on the roblox wiki. I do not know how to make the spinning stop when I click the start button in the above script. Does anyone know how? If they do, that would be great.

Here is the Camera scirpt,


local target = workspace.Baseplate local camera = workspace.CurrentCamera camera.CameraType = Enum.CameraType.Scriptable camera.CameraSubject = target local angle = 0 local i = 0 while wait() do camera.CoordinateFrame = CFrame.new(target.Position) * CFrame.Angles(0, angle, 0) * CFrame.new(0, 200, 500) angle = angle + math.rad(1) i = i + 1 end

1 answer

Log in to vote
0
Answered by 8 years ago

Here's something to think about how is the camera manipulation suppose to know the gui? so add a path to the gui and it should work 50/50

Ad

Answer this question