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
 

Value is not apart of Player?

Previous Thread :: Next Thread 
DreadFate is not online. DreadFate
Joined: 14 Jul 2013
Total Posts: 32
13 Apr 2015 07:03 AM
game.Players.PlayerAdded:connect(function(p)
local Humanoid = p.Name
if p.Leaderstats.devil.Value == "Mera" then
game.Workspace.Humanoid.Humanoid.Name = "Logia"
end

end)



Basically, p is meant to be the player in game.Players and the humanoid is trying to connect to that through the name of the player... but the output says Leaderstats is not a value of Player? In another script, it places Leaderstats in the player and all values go through there... but it's not working and the output says that... I don't know how to fix it, it's really exploding my head.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
13 Apr 2015 07:05 AM
Can't use two variables like that sir it just won't work.
Also use waitforchild on leaderstats also they don't have capitol L or it won't show up.
(p.Character.Humanoid.Name = 'Bob')
Report Abuse
DreadFate is not online. DreadFate
Joined: 14 Jul 2013
Total Posts: 32
13 Apr 2015 07:13 AM
Thank you, my good sir... there are no more errors in output about it... but it appears the humanoid isn't changing it's name? this is the new updated script(Thanks to you)

game.Players.PlayerAdded:connect(function(p)
if p.Leaderstats.devil.Value == "Mera" then
p.Character.Humanoid.Name = "Logia"
end

end)


Also, the "Leaderstats" is meant to have a capital L, unless ROBLOX updated it where they are going completely against lowercase letters now.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
13 Apr 2015 07:15 AM
Also you might want to do this so it won't error.

game.Players.PlayerAdded:connect(function(p)
repeat wait() until p.Character--Can't use waitforchild on a players character it'll error.
p:WaitForChild'Leaderstats':WaitForChild'devil'
if p.Leaderstats.devil.Value == "Mera" then
p.Character.Humanoid.Name = 'Logia'
end
end)
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
13 Apr 2015 07:17 AM
--Oh maybe the humanoid too.

game.Players.PlayerAdded:connect(function(p)
repeat wait() until p.Character--Can't use waitforchild on a players character it'll error.
p:WaitForChild'Leaderstats':WaitForChild'devil'
p.Character:WaitForChild'Humanoid'
if p.Leaderstats.devil.Value == "Mera" then
p.Character.Humanoid.Name = 'Logia'
end
--You might also want to make it change on respawn too.
end)
Report Abuse
DreadFate is not online. DreadFate
Joined: 14 Jul 2013
Total Posts: 32
13 Apr 2015 07:20 AM
Still doesn't change the humanoid name for some reason...

and it is creating even more problems...

Gah, why did I bother to try and script again?

Well, thanks for trying to help me sir, but this was the biggest mind f*ck I had trying to script, but once again, thanks for helping.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
13 Apr 2015 07:22 AM
Cause the way you made the script is so it only changes when you first join so if you die it'll go back to humanoid?
Report Abuse
DreadFate is not online. DreadFate
Joined: 14 Jul 2013
Total Posts: 32
13 Apr 2015 07:24 AM
I am testing this in studio, we could try test it in the actual game, but I guess you are right.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
13 Apr 2015 07:27 AM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
--code
end)
end)

--Try this?
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
13 Apr 2015 07:28 AM
And sure i'll give you a tix. :p
Report Abuse
DreadFate is not online. DreadFate
Joined: 14 Jul 2013
Total Posts: 32
13 Apr 2015 07:32 AM
Holy crap, it got fixed... thanks man.
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