generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Respawn button?

Previous Thread :: Next Thread 
cjjordanparker is not online. cjjordanparker
Joined: 28 Jul 2012
Total Posts: 1058
20 Apr 2016 04:27 AM
Does anyone know how to make a respawn button that when you click it it has a short gui then it plays?
Report Abuse
Illisium is not online. Illisium
Joined: 28 Sep 2010
Total Posts: 6
20 Apr 2016 06:32 AM
Make a ScreenGui in StarterGui and add a TextButton into it.
Then, paste this code into a script in the TextButton.
Click play and click the button.

script.Parent.MouseButton1Click:connect(function()
local player = script.Parent.Parent.Parent.Parent < I'll explain this.
script - this script
parent 1 - textbutton
parent 2 - screengui
parent 3 - startergui if play pressed playergui
parent 4 - player
player.Character.Humanoid.Health = 0
player:LoadCharacter(true) < loads the player's character instantly without it's parts flying around. Remove it if you don't want that.
end)

Not explained VV
script.Parent.MouseButton1Click:connect(function()
local player = script.Parent.Parent.Parent.Parent
player.Character.Humanoid.Health = 0
player:LoadCharacter(true)
end)


Report Abuse
cjjordanparker is not online. cjjordanparker
Joined: 28 Jul 2012
Total Posts: 1058
20 Apr 2016 06:51 AM
OK will I need anything else if I'm trying to make a choose your class gui?and thx for your help
Report Abuse
cjjordanparker is not online. cjjordanparker
Joined: 28 Jul 2012
Total Posts: 1058
20 Apr 2016 07:57 AM
Bumping
Report Abuse
1daev3 is not online. 1daev3
Joined: 20 Dec 2015
Total Posts: 570
20 Apr 2016 09:37 AM
Well if you want to create a respawn button:



--Made by 1daev3
function m1down()
script.Parent.Parent.Parent.Parent:LoadCharacter()
end

script.Parent.MouseButton1Down:connect(m1down)



Now you have to move that and add a text to it and move the script to starter GUI
Report Abuse
cjjordanparker is not online. cjjordanparker
Joined: 28 Jul 2012
Total Posts: 1058
20 Apr 2016 09:56 AM
OK thx
Report Abuse
cjjordanparker is not online. cjjordanparker
Joined: 28 Jul 2012
Total Posts: 1058
24 Apr 2016 07:35 PM
does it work if your trying to get teleported somewhere else?
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
24 Apr 2016 08:51 PM
Steps:

1: Create a screen gui and place it inside startergui service
2: Create a button gui inside the screen gui
3: Position the button where you want and resize as desired
4: Create a local script inside the button
5: Copy and paste the following text into the local script

local debounce1, debounce2 = false, false
script.Parent.MouseButton1Click:connect(function()
if not debounce1 then
debounce1 = true
local newa,newb,newc,newd = Instance.new('Frame'), Instance.new('TextLabel'), Instance.new('TextButton'), Instance.new('TextButton')
local connection1, connection2

newa.Parent = script.Parent.Parent
newa.Size = UDim2.new(.3,0, .4,0)
newa.Position = UDim2.new(.35,0, 1.4,0)
newa.Style = Enum.FrameStyle.DropShadow

newb.Parent = newa
newb.Size = UDim2.new(1,0, .5,0)
newb.Text = "Are you sure you want to reset your character?"
newb.BackgroundTransparency = 1
newb.TextColor3 = Color3.new(1, 127/255, 0)
newb.Font = Enum.Font.SourceSansBold
newb.TextScaled = true
newb.ZIndex = 2

newc.Parent = newa
newc.Size = UDim2.new(.5,0, .5,0)
newc.Position = UDim2.new(0,0, .5,0)
newc.Text = "Yes"
newc.BackgroundTransparency = .9
newc.BorderSizePixel = 0
newc.BackgroundColor3 = Color3.new(0, 1, 0)
newc.TextColor3 = Color3.new(0, 1, 0)
newc.Font = Enum.Font.SourceSansBold
newc.TextScaled = true
newc.ZIndex = 2

newd.Parent = newa
newd.Size = UDim2.new(.5,0, .5,0)
newd.Position = UDim2.new(0.5,0, .5,0)
newd.Text = "No"
newd.BackgroundTransparency = .9
newd.BorderSizePixel = 0
newd.BackgroundColor3 = Color3.new(1, 0, 0)
newd.TextColor3 = Color3.new(1, 0, 0)
newd.Font = Enum.Font.SourceSansBold
newd.TextScaled = true
newd.ZIndex = 2

newa:TweenPosition(UDim2.new(.35,0, .4,0),"Out","Back",1.5)
wait(1.5)

connection1 = newc.MouseButton1Click:connect(function()
if not debounce2 then
debounce2 = true
connection1:disconnect()
connection2:disconnect()
game.Players.LocalPlayer:LoadCharacter()
end
end)
connection2 = newd.MouseButton1Click:connect(function()
if not debounce2 then
debounce2 = true
connection1:disconnect()
connection2:disconnect()
newa:TweenPosition(UDim2.new(.35,0, -1.6,0),"In","Back",1.5)
wait(1.5)
newa:Destroy()
debounce1, debounce2 = false, false
end
end)
end
end)
Report Abuse
1daev3 is not online. 1daev3
Joined: 20 Dec 2015
Total Posts: 570
25 Apr 2016 10:33 AM
your welcome by the way the guy above me nice script
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image