i made a script but its not working the thing that it is supposed to do is make the sun appear on click and make it look like its going to explode with sunrays effect
here is the script: it also dosent show anything on the output
01 | script.Parent.ClickDetector.MouseClick:Connect( function () |
02 | print ( "TheSunIsADeadlyLaser" ) |
03 | game.Lighting.Sky.CelestialBodiesShown = true |
04 | game.Lighting.SunRays.Enabled = true |
05 | game.StarterGui.EndGui.Message.Visible = true |
06 | game.StarterGui.EndGui.Message.Text = "Hey Can we go on land?" |
07 | game.StarterGui.EndGui.Message.Text = "NO" |
08 | game.StarterGui.EndGui.Message.Text = "why?" |
09 | game.StarterGui.EndGui.Message.Text = "THE SUN IS A DEADLY LASER" |
10 | game.StarterGui.EndGui.Whitee.Visible = true |
11 | end ) |
im also a beginner scripter
Roblox reads scripts as me, very, very fast, try to give it a delay. Also try to pcall it, pcalling tests the script if there is a error and prints it to the output, as long as you do it like me.
01 | local s,e = pcall ( function () |
02 | script.Parent.ClickDetector.MouseClick:Connect( function () |
03 | wait( 1 ) |
04 | print ( "TheSunIsADeadlyLaser" ) |
05 | game.Lighting.Sky.CelestialBodiesShown = true |
06 | game.Lighting.SunRays.Enabled = true |
07 | game.StarterGui.EndGui.Message.Visible = true |
08 | wait() |
09 | game.StarterGui.EndGui.Message.Text = "Hey Can we goona on land?" |
10 | wait( 3 ) |
11 | game.StarterGui.EndGui.Message.Text = "NO" |
12 | wait( 2 ) |
13 | game.StarterGui.EndGui.Message.Text = "why?" |
14 | wait( 2 ) |
15 | game.StarterGui.EndGui.Message.Text = "THE SUN IS A DEADLY LASER" |
16 | wait( 4 ) |
17 | game.StarterGui.EndGui.Whitee.Visible = true |
18 | end ) |
19 | end ) if not s = = true then warn(e) end |
I hope i was able to help! Good day!