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
 

attempt to concatenate local 'player' (a userdata value)

Previous Thread :: Next Thread 
jellp is not online. jellp
Joined: 15 Jan 2009
Total Posts: 448
23 Jul 2013 03:19 PM
So I am trying to make a team specific GUI currently, but ran into a problem I do not know how to fix.

The error I get is attempt to concatenate local 'player' (a userdata value)

Script:

function onEntered(player)
print("PLAYER ENTERED")
local s = Instance.new("Script")
--createscript( [[name = "]] .. player[i].name .. [["
createscript( [[name = "]] .. player .. [["
ov = Instance.new("ObjectValue")
ov.Value = game.Players:FindFirstChild(name)
ov.Name = "TeamGUI"
ov.Parent = script
player = ov.Value
function oa(object)
local elplayer = game.Players:playerFromCharacter(object)
if elplayer ~= nil then
if elplayer == player then
local torso = object:FindFirstChild("Torso")
if torso ~= nil then
wait(5)
if torso.Brickcolour("Navy blue") then
game.StarterGui.Navyblue:GetChildren() [c].Visible = true
end end end end end
game.Workspace.ChildAdded:connect(oa)
]],game.Workspace)



Sorry for the code being a bit of a mess, I also didn't include all the code as I am certain the last piece of code is right.
Report Abuse
Absurdism is not online. Absurdism
Joined: 18 Jul 2013
Total Posts: 2568
23 Jul 2013 03:22 PM
Just a warning: if you're trying to edit the source of a Script object, please disregard your imminent failure as that is no longer possible.
There could be a lot of things wrong here. I'm going to go by your syntax and hope you know what you're doing.

function onEntered(player)
print("PLAYER ENTERED")
local s = Instance.new("Script")
--createscript( [[name = "]] .. player[i].name .. [["
createscript( [[name = "]] .. player[i].Name .. [["
ov = Instance.new("ObjectValue")
ov.Value = game.Players:FindFirstChild(name)
ov.Name = "TeamGUI"
ov.Parent = script
player = ov.Value
function oa(object)
local elplayer = game.Players:playerFromCharacter(object)
if elplayer ~= nil then
if elplayer == player then
local torso = object:FindFirstChild("Torso")
if torso ~= nil then
wait(5)
if torso.Brickcolour("Navy blue") then
game.StarterGui.Navyblue:GetChildren() [c].Visible = true
end end end end end
game.Workspace.ChildAdded:connect(oa)
]],game.Workspace)
Report Abuse
jellp is not online. jellp
Joined: 15 Jan 2009
Total Posts: 448
23 Jul 2013 04:22 PM
Thanks!
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