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 » Scripting Helpers
Home Search
 

GUI script

Previous Thread :: Next Thread 
Hergest is not online. Hergest
Joined: 17 May 2011
Total Posts: 309
01 May 2013 04:02 PM
Started sticking my nose in GUI's. Made a ScreenGUI with a frame with a textbox in it containing the following script:
------------------------------------------------
button = script.Parent
player = Script.Parent.Parent.Parent.Parent

button.MouseClick1Button:connect(function()
if player.Character then player.Character:Breakjoints() end
end

----------------------------------------------------
But when i click the Textbox in-game. It prompts me to change the text instead of dying. Please help.
Report Abuse
Hergest is not online. Hergest
Joined: 17 May 2011
Total Posts: 309
01 May 2013 04:21 PM
bump
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
01 May 2013 04:25 PM
button = script.Parent;
player = game.Players.LocalPlayer;

button.MouseButton1Click:connect(function()
if player.Character then
player.Character:BreakJoints();
end
end)

--local script.
Report Abuse
velibor is not online. velibor
Joined: 24 Nov 2009
Total Posts: 1003
01 May 2013 04:27 PM
Put inside LocalScript.

script.Parent.MouseButton1Click:connect(function()
if Game.Players.LocalPlayer.Character then
Game.Playes.LocalPlayer:LoadCharacter()
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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