|
| 19 Jul 2015 05:52 PM |
When ever I die I get this starting screen/ welcome screen again. plz someone help me fix this.
local Player = game.Players.LocalPlayer local PlayerGui = Player.PlayerGui game.Players.PlayerAdded:connect(function(nP) -- connect event to anonymous function nP.CharacterAdded:connect(function(nC) -- connect event to anonymous function local sg = Instance.new("ScreenGui", nP.PlayerGui) -- create the screengui sg.Name = "Welcome" -- set its name local fr = Instance.new("Frame", sg) -- create the frame inside the ScreenGui fr.Size = UDim2.new(0, 1300, 0, 700) -- set its size fr.Position = UDim2.new(0.0, 0, 0.0, 0) -- center the frame fr.Style = "RobloxRound" local tb = Instance.new("TextButton", fr) -- create a textbutton, put it in frame tb.Size = UDim2.new(0.6, 0, 0.1, 0) tb.Position = UDim2.new(0.26, 0.0, 0.8, 0.0) tb.Style = "RobloxButtonDefault" tb.TextColor3 = Color3.new(1, 1, 1) tb.Text = "Destroy Me(Spare Me!!!!!)" local tl = Instance.new("TextLabel", fr) tl.Name = "Desc" tl.Size = UDim2.new(0.6, 0.0, 0.1, 0.0) tl.Position = UDim2.new(0.26, 0.0, 0.1, 0.0) tl.BackgroundTransparency = 1 tl.TextColor3 = Color3.new(1, 1, 1) tl.Text = "Welcome to This test!" local firstclone = tl:Clone()-- clone of first with a evil twist-- firstclone.Name = "firstclone" firstclone.Parent = fr firstclone.Text = "omg it did" firstclone.Position = UDim2.new(0.26, 0.0, 0.3, 0.0) tb.MouseButton1Click:connect(function()--obliteration-- sg:Destroy() tb:Destroy() tl:Destroy() firstclone:Destroy() end) end) end) |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2015 05:55 PM |
| This script creates the gui with instance.new() functions so don't actually create a gui in edit mode just let it run and fix it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jul 2015 06:27 PM |
Just to let you know
No one likes reading scripts like this, theyre too long and waste our time. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jul 2015 06:47 PM |
| Im trying to indirectly tell you to break it down and find out where the error is. |
|
|
| Report Abuse |
|
|
| |
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 19 Jul 2015 06:54 PM |
local Player = game.Players.LocalPlayer local PlayerGui = Player.PlayerGui game.Players.PlayerAdded:connect(function(nP) -- connect event to anonymous function local sg = Instance.new("ScreenGui", nP.PlayerGui) -- create the screengui sg.Name = "Welcome" -- set its name local fr = Instance.new("Frame", sg) -- create the frame inside the ScreenGui fr.Size = UDim2.new(0, 1300, 0, 700) -- set its size fr.Position = UDim2.new(0.0, 0, 0.0, 0) -- center the frame fr.Style = "RobloxRound" local tb = Instance.new("TextButton", fr) -- create a textbutton, put it in frame tb.Size = UDim2.new(0.6, 0, 0.1, 0) tb.Position = UDim2.new(0.26, 0.0, 0.8, 0.0) tb.Style = "RobloxButtonDefault" tb.TextColor3 = Color3.new(1, 1, 1) tb.Text = "Destroy Me(Spare Me!!!!!)" local tl = Instance.new("TextLabel", fr) tl.Name = "Desc" tl.Size = UDim2.new(0.6, 0.0, 0.1, 0.0) tl.Position = UDim2.new(0.26, 0.0, 0.1, 0.0) tl.BackgroundTransparency = 1 tl.TextColor3 = Color3.new(1, 1, 1) tl.Text = "Welcome to This test!" local firstclone = tl:Clone()-- clone of first with a evil twist-- firstclone.Name = "firstclone" firstclone.Parent = fr firstclone.Text = "omg it did" firstclone.Position = UDim2.new(0.26, 0.0, 0.3, 0.0) tb.MouseButton1Click:connect(function()--obliteration-- sg:Destroy() tb:Destroy() tl:Destroy() firstclone:Destroy() end) end) end)
The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // 27,155 RAP // R$11,972 |
|
|
| Report Abuse |
|
|
| |
|