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
 

Re: Can't Seem To Find The Problem

Previous Thread :: Next Thread 
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:05 PM
Im trying to make a GUI that shows your deaths but I cant seem to get my leaderboard to show my deaths whats wrong? Thanks!

function onplayerentered (newplayer)
local stats = Instance.new("IntValue", newplayer)
stats.Name = "leaderstats"
local Level = Instance.new("IntValue", stats)
Level.Name = "Level"
local Stars = Instance.new("IntValue", stats)
Stars.Name = "Stars"
local Deaths = Instance.new("IntValue", stats)
Deaths.Name = "Deaths"
end
function onHumanoidDied(humanoid, player)
local stats = player:findFirstChild("leaderstats")
if stats ~= nil then
local Deaths = stats:findFirstChild("Deaths")
Deaths.Value = Deaths.Value + 1


local killer = getKillerOfHumanoidIfStillInGame(humanoid)

handleKillCount(humanoid, player)
end
end

function onPlayerRespawn(property, player)

if property == "Character" and player.Character ~= nil then
local humanoid = player.Character.Humanoid
local p = player
local h = humanoid
humanoid.Died:connect(function() onHumanoidDied(h, p) end )
end
end
game.Players.PlayerAdded:connect(onplayerentered)
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:20 PM
Bump
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
16 Aug 2012 09:22 PM
When you play it in solo mode, is there an IntValue in leaderstats called "Deaths"?

-orangegreenblue, the Lua Noob
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:22 PM
Yes
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
16 Aug 2012 09:24 PM
Are you sure it's not just hidden?

Try expanding the leaderboard.

-orangegreenblue, the Lua Noob
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:26 PM
yes i have a kill brick so i can test and my leaderbooard never changes so my GUi never changes
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
16 Aug 2012 09:28 PM
What I mean is press the button on the top left corner of the leaderboard.

-orangegreenblue, the Lua Noob
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
16 Aug 2012 09:31 PM
You mean top right?
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
16 Aug 2012 09:33 PM
>You mean top right?

No.

There's nothing at the top right of the leaderboard.

-orangegreenblue, the Lua Noob
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:34 PM
let me try
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
16 Aug 2012 09:35 PM
Sowwy :c
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:36 PM
Didnt work any other ideas? if not thanks for your help.
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
16 Aug 2012 09:37 PM
If an IntValue exists in leaderstats, it should technically be on the leaderboard.

-orangegreenblue, the Lua Noob
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
16 Aug 2012 09:38 PM
Is that the full script?

Because if it is, handleKillCount isn't a function.

-orangegreenblue, the Lua Noob
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:39 PM
It displays Deaths its just when I die it doesnt go up 1
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
16 Aug 2012 09:41 PM
"handleKillCount(humanoid, player)
end
end"

Lolwhat?
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
16 Aug 2012 09:41 PM
There seems to be a lot of functions that don't exist that you are trying to call.

-orangegreenblue, the Lua Noob
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:42 PM
im a beginner could someone help me edit this?
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 09:53 PM
Bump
Report Abuse
TRRxSL4YER is not online. TRRxSL4YER
Joined: 23 Dec 2011
Total Posts: 119
16 Aug 2012 10:01 PM
Bump (Last)
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