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: Is it possible to remove the reset feature?

Previous Thread :: Next Thread 
Robloxianpilotknight is not online. Robloxianpilotknight
Joined: 29 Dec 2009
Total Posts: 7739
08 Nov 2016 12:34 PM
A game I am drafting up has the potential to break if a player resets their character. The game is GUI based, and death is not possible through normal gameplay. Important information is saved through data persistance in a character's gui, and if I recall correctly the values are set to a default value if a character were to die.

I could work around this annoyance by saving values elsewhere, but if another fix is available I would prefer that option.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Nov 2016 12:46 PM
Yes.

--local script

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local human = char:WaitForChild('Humanoid')
human.Name = 'Human'


Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
08 Nov 2016 12:50 PM
Changing the humanoid name is not only irksome and potentially game-breaking, it is no longer needed:
http://devforum.roblox.com/t/customizable-reset-button-logic/30463
Report Abuse
Robloxianpilotknight is not online. Robloxianpilotknight
Joined: 29 Dec 2009
Total Posts: 7739
08 Nov 2016 03:36 PM
Came out yesterday. That's awesome. Thank you everyone!
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Nov 2016 03:42 PM
'and potentially game-breaking'

Not if you know what you are doing.


Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
08 Nov 2016 03:45 PM
You're right, because I myself have made a game with custom named humanoids and it works fine, it's just so hackish and ew.
Report Abuse
j_sherman is not online. j_sherman
Joined: 05 Jun 2009
Total Posts: 1199
08 Nov 2016 03:50 PM
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
that disables resetting


Report Abuse
Robloxianpilotknight is not online. Robloxianpilotknight
Joined: 29 Dec 2009
Total Posts: 7739
08 Nov 2016 03:55 PM
The game has no use for humanoids, so either method works.
Report Abuse
jody7777 is not online. jody7777
Joined: 22 Feb 2009
Total Posts: 1343
08 Nov 2016 11:17 PM
it's a bad practice @TimeTicks


FOR THE CAUSE
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
09 Nov 2016 02:22 AM
SetCore actually disables the reset button, changing the Humanoid name just breaks it.
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
09 Nov 2016 06:58 AM
yea cuz for some reason dumb roblox did something like
pcall(function() game.Players.LocalPlayer.Character.Humanoid.Health=0 end)
so if its not called humanoid it won't run
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
09 Nov 2016 07:05 AM
funny thing is that u can fix that by setting the callback to a bindable event with this connection
game.Players.Character:BreakJoints()
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
09 Nov 2016 07:06 AM
.LocalPlayer.Character*
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
10 Nov 2016 08:20 AM
Roblox left it that way intentionally, and wrapping it in a pcall would be stupid.
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
10 Nov 2016 10:57 AM
no I'm saying roblox runs it like a pcall because no errors appear
Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37141
10 Nov 2016 11:13 AM
The real question is... why are you still using data persistence?

DataStores are way better and are not deprecated.

I have a spider on my back.
Report Abuse
mybowls72 is not online. mybowls72
Joined: 05 Aug 2013
Total Posts: 2688
10 Nov 2016 11:17 AM
Change the name of the Humanoid.

I dont have a spider on my back
Report Abuse
10MilesWide is not online. 10MilesWide
Joined: 06 Aug 2014
Total Posts: 2220
10 Nov 2016 11:20 AM
Or they could use humanoid = FindFirstChild("Humanoid") if humanoid then humanoid.Health = 0 end

https://www.roblox.com/library/359444683/H-W-A-Arrow
Report Abuse
Robloxianpilotknight is not online. Robloxianpilotknight
Joined: 29 Dec 2009
Total Posts: 7739
10 Nov 2016 05:02 PM
@Saliance, because I forgot about its existence. I usually have used Data Persistance. Data storage is more useful for what I need, so I will use that instead.
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