Eston
|
  |
| Joined: 13 May 2008 |
| Total Posts: 21591 |
|
|
| 17 Aug 2015 06:12 PM |
I need help to make this work. It runs the first couple bits of code, but once it gets to "ambience:Play()" it doesn't work. I was told to make a global script to force this script to be disabled until everything has loaded, but I don't know how to accomplish that.
local plr=game.Players.LocalPlayer local chr=plr.Character or plr.CharacterAdded:wait() local cam=game.Workspace.CurrentCamera local play=game.StarterGui.ScreenGui.Frame.TextButton local label1 = play.Parent.TextLabel1 local label2 = play.Parent.TextLabel2 local ambience = play.MenuAmbience local lightson = play.LightsOn local lightsoff = play.LightsOff
plr.CharacterAdded:connect(function(character) wait() cam.CameraType = 0 cam.CoordinateFrame=CFrame.new(-240, 11, -68) cam.FieldOfView=70 cam.Focus=CFrame.new(-238, 12, -76) ambience:Play() for i = 1,100 do label1.TextTransparency = 1-(i/100) wait(0.001) end wait(1) for i = 1,100 do label2.TextTransparency = 1-(i/100) wait(0.001) end wait(1) play.Visible = true end)
play.MouseEnter:connect(function() play.TextStrokeColor3 = Color3.new(255,0,0) end)
play.MouseLeave:connect(function() play.TextStrokeColor3 = Color3.new(255,255,255) end)
play.MouseButton1Click:connect(function() script.Parent.Parent.BackgroundTransparency = 0 play.Text = "" label1.Text = "" label2.Text = "" lightsoff:Play() ambience:Stop() wait(6) script.Parent.Parent.BackgroundTransparency = 1 lightson:Play() cam.CameraType = 5 cam.CameraSubject = plr.Character.Humanoid play.Parent.Parent:Remove() end) |
|
|
| Report Abuse |
|
Eston
|
  |
| Joined: 13 May 2008 |
| Total Posts: 21591 |
|
| |
|
| 17 Aug 2015 06:52 PM |
| You see the for loop? It has 100. You should make it a lower number so the script runs faster. |
|
|
| Report Abuse |
|