Is the coding for GUIs broken?
(This is a valid question, scripting related) I ask because yesterday I made about 2-3 GUI scripts, they were working, but today they aren't working, is the Coding for GUIs broken? Here is one of the scripts;
03 | repeat wait( 0 ) until game.Players.LocalPlayer and game.Players.LocalPlayer:FindFirstChild( "PlayerGui" ) |
04 | local PlaceId = 56599476 |
06 | local scr = Instance.new( "ScreenGui" , game.Players.LocalPlayer.PlayerGui) |
08 | local scr 2 = Instance.new( "TextButton" , scr) |
09 | scr 2. Position = UDim 2. new( 1 ,- 250 , 1 ,- 42 ) |
11 | scr 2. Name = "Teleportation" |
12 | scr 2. Size = UDim 2. new( 0 , 250 , 0 , 20 ) |
13 | scr 2. TextColor 3 = Color 3. new( 0 , 0 , 0 ) |
14 | scr 2. BackgroundColor 3 = Color 3. new( 1 , 1 , 1 ) |
15 | scr 2. MouseButton 1 Down:connect( function () |
16 | for i,v in pairs (scr:GetChildren()) do if v.Name = = "Are you sure" or v.Name = = "Cancel" then v:Destroy() end end |
17 | local scr 3 = Instance.new( "TextButton" , scr) |
18 | scr 3. Name = "Are you sure" |
19 | scr 3. Text = "Are you sure you want to teleport?" |
20 | scr 3. Position = UDim 2. new( 1 ,- 600 , 1 ,- 250 ) |
21 | scr 3. Size = UDim 2. new( 0 , 250 , 0 , 20 ) |
22 | scr 3. TextColor 3 = Color 3. new( 0 , 0 , 0 ) |
23 | scr 3. BackgroundColor 3 = Color 3. new( 1 , 1 , 1 ) |
24 | local scr 4 = Instance.new( "TextButton" , scr) |
27 | scr 4. Position = UDim 2. new( 1 ,- 600 , 1 ,- 220 ) |
28 | scr 4. Size = UDim 2. new( 0 , 250 , 0 , 20 ) |
29 | scr 4. TextColor 3 = Color 3. new( 0 , 0 , 0 ) |
30 | scr 4. BackgroundColor 3 = Color 3. new( 1 , 1 , 1 ) |
31 | scr 3. MouseButton 1 Down:connect( function () |
32 | game:GetService( "TeleportService" ):Teleport(PlaceId, game.Players.LocalPlayer) |
34 | scr 4. MouseButton 1 Down:connect( function () |
This script was working perfectly yesterday, but now today it isn't, did the coding really break?