So, I just made this but it doesn't work!
Please can someone tell me!
01 | function onClicked() |
02 | local h = Instance.new( "Message" ) |
03 | h.Parent = game.Workspace |
04 | h.Text = "Attention!" |
05 | wait( 5 ) |
06 | h.Text = "Self Destruct Activated!" |
07 | wait( 5 ) |
08 | h.Text = "You have two minutes to evacuate!" -----You can adjust time if you wish but make sure you remove any extra wait command thingies |
09 | wait( 5 ) |
10 | h.Text = "90 Seconds!" |
11 | local s = Instance.new( "Smoke" ) ----- This creates smoke simply for the effect! |
12 | s.Parent = game.Workspace.SDS.SBrick 1 ----- You can add more smoke scripts by making new bricks and copying this line with new bricks name! |
13 | wait( 5 ) |
14 | h.Text = "60 Seconds!" |
15 | wait( 5 ) |
17:34:46.697 - Expected ':' not '.' calling member function Remove 17:34:46.698 - Script 'Workspace.SDS.SD.Script', Line 28 17:34:46.698 - Stack End
Best regards, Nathan
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?
01 | function onClicked() |
02 | local h = Instance.new( "Message" ) |
03 | h.Parent = game.Workspace |
04 | h.Text = "Attention!" |
05 | wait( 5 ) |
06 | h.Text = "Self Destruct Activated!" |
07 | wait( 5 ) |
08 | h.Text = "You have two minutes to evacuate!" -----You can adjust time if you wish but make sure you remove any extra wait command thingies |
09 | wait( 5 ) |
10 | h.Text = "90 Seconds!" |
11 | local s = Instance.new( "Smoke" ) ----- This creates smoke simply for the effect! |
12 | s.Parent = game.Workspace.SDS.SBrick 1 ----- You can add more smoke scripts by making new bricks and copying this line with new bricks name! |
13 | wait( 5 ) |
14 | h.Text = "60 Seconds!" |
15 | wait( 5 ) |
The error is simple, you put . when you were supposed to put a : The script corrected & simplified
01 | script.Parent.SelfD.MouseClick:connect( function () |
02 | local h = Instance.new( "Message" ,game.Workspace) |
03 | h.Text = "Attention!" |
04 | wait( 5 ) |
05 | h.Text = "Self Destruct Activated!" |
06 | wait( 5 ) |
07 | h.Text = "You have two minutes to evacuate!" |
08 | wait( 5 ) |
09 | h.Text = "90 Seconds!" |
10 | local s = Instance.new( "Smoke" ,game.Workspace.SDS.SBrick 1 ) |
11 | wait( 5 ) |
12 | h.Text = "60 Seconds!" |
13 | wait( 5 ) |
14 | h.Text = "45 Seconds!" |
15 | wait( 5 ) |
Because script.Parent.SelfD.MouseClick:connect(function ()
02 local h = Instance.new("Message",game.Workspace)
03 h.Text = "Attention!"
04 wait(5)
05 h.Text = "Self Destruct Activated!"
06 wait(5)
07 h.Text = "You have two minutes to evacuate!"
08 wait(5)
09 h.Text = "90 Seconds!"
10 local s = Instance.new("Smoke",game.Workspace.SDS.SBrick1)
11 wait(5)
12 h.Text = "60 Seconds!"
13 wait(5)
14 h.Text = "45 Seconds!"
15 wait(5)
16 h.Text = "30 Seconds!"
17 wait(5)
18 h.Text = "15 Seconds!"
19 wait(5)
20 h.Text = "10 Seconds!"
21 wait(5)
22 h.Text = "5 Seconds!"
23 wait(5)
24 h.Text = "Initiating Self Destruct!"
25 wait(5)
26 s:Remove()
27 local e = Instance.new("Explosion",game.Workspace.SDS.EBrick1)
28 e:Remove() -- You should put a "wait()" before this so the explosion doesn't auto remove when created ~tyopido
29 wait(5)
30 local e = Instance.new("Explosion",game.Workspace.SDS.EBrick1)
31 e:Remove() -- Same as line 28 ~tyopido
32 wait(5)
33 local e = Instance.new("Explosion",game.Workspace.SDS.EBrick1)
34 e:Remove() -- Same as line 28 ~tyopido
35 wait(5)
36 h:Remove()
37 end)