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: Can you guys check this out?

Previous Thread :: Next Thread 
theninjaguy987 is not online. theninjaguy987
Joined: 21 Jun 2013
Total Posts: 766
11 May 2015 06:27 PM
if script.Parent.Parent:FindFirstChild("leaderstat") ~= nil then
if script.Parent.Parent.leaderstat:findFirstChild("EXP") ~= nil then
if script.Parent.Parent.leaderstat.EXP.Value < 0 then
script.Parent.Parent.leaderstat.EXP.Value = script.Parent.Parent.Level.Value * 60
if script.Parent.Parent.Character:findFirstChild("Humanoid") ~= nil then
if script.Parent.parent.leaderstat:findFirstChild("Level") ~= nil then
script.Parent.Parent.leaderstat.Level.Value = script.Parent.Parent.Level.Value + 1


This is my level up system. It is a script placed in the StarterPack.
I want to know if it will do this:

When a persons EXP becomes less than zero, their EXP's new value becomes the players level value, times 60. Then, their level is increased by 1.

What do you think of my script? Will it work? Will it glitch/fail or not work? Thanks for the feedback! If you don't think this would work, then please try to correct it for me or give me pointers! Thanks again!

-Theninjaguy987
Report Abuse
bluefrog53 is not online. bluefrog53
Joined: 05 Feb 2012
Total Posts: 766
11 May 2015 06:28 PM
Wait, did you say you inserted a script in the starter pack?
Report Abuse
bluefrog53 is not online. bluefrog53
Joined: 05 Feb 2012
Total Posts: 766
11 May 2015 06:29 PM
In my experience the starter pack is strictly for tools and you should bind this to an event.
Report Abuse
mycheeze is online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
11 May 2015 06:32 PM
if script.Parent.Parent:FindFirstChild'leaderstat' then
local A = script.Parent.Parent.leaderstat:FindFirstChild'EXP'
if A then if A.Value < 0 then A.Value = script.Parent.Parent.Level.Value * 60
if script.Parent.Parent.Character:FindFirstChild'Humanoid' then
local B = script.Parent.parent.leaderstat:FindFirstChild'Level'
if B then B.Value = script.Parent.Parent.Level.Value + 1

>add your ends
Report Abuse
theninjaguy987 is not online. theninjaguy987
Joined: 21 Jun 2013
Total Posts: 766
11 May 2015 06:36 PM
@ mycheeze

So, that will work if it just sits in the players starterpack, every time their EXP goes below zero?
Report Abuse
theninjaguy987 is not online. theninjaguy987
Joined: 21 Jun 2013
Total Posts: 766
11 May 2015 06:59 PM
Bump!
Report Abuse
mycheeze is online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
11 May 2015 07:01 PM
I r nawt sur, lemme run dis k?

qq
Report Abuse
theninjaguy987 is not online. theninjaguy987
Joined: 21 Jun 2013
Total Posts: 766
11 May 2015 07:06 PM
Okay! :0
Report Abuse
mycheeze is online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
11 May 2015 07:13 PM
local P = game.Players.LocalPlayer
local C = P.Character or P.CharacterAdded:wait()
local leaderstat = P:WaitForChild'leaderstat'
local EXP = leaderstat:WaitForChild'EXP'
local Level = leaderstat:WaitForChild'Level'
local Level2 = P:WaitForChild'Level'

EXP.Changed:connect(function() if Level2 then
if EXP then if EXP.Value < 0 then EXP.Value = Level2.Value * 60
if C then if Level then Level.Value = Level2.Value + 1
end end end end end end)

This should be correct

>that is if EXP and Level are inside the leaderstat instance
as well as level and if leaderstat' and the other 'Level' are inside the player
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