|
| 01 Jan 2014 08:44 PM |
| Ok, so I'm trying to get this GUI to print out if this person is in a group, however the person is defined by a string value, so I have the string value being made into a string value inside the script (The first inside workspace, as it comes from another script) then another value finding the child that matches the string name. This all works, however when it goes to print it says in the remote error monitoring script that it is attempting to call a userdata value! How can I get it to print? (Note, if it matters, the GUI is a surface GUI.) |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 08:46 PM |
The script is: function hit() Name = game.Workspace.OfficeSee.Value x = game.Players:FindFirstChild(Name) wait(3) info=game.Workspace.InformationRank.SurfaceGui.Frame if x:IsInGroup(953427) then y = "Yes" else y = "No" end if x:IsInGroup(898867) then z = "Yes" else z = "No" end if x:IsInGroup(275587) then a = "Yes" else a = "No" end if x:IsInGroup(851561) then b = "Yes" else b = "No" end info.TextLabel.Text = print(x.." ".."Corus: "..y.." ".."Sable: "..z.." ".."Shock Troopers: "..a.." ".."WEC: "..b) info.Visible = true wait(100) info.Visible = false end game.Workspace.SpeedysElevator.Touched:connect(hit) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 01 Jan 2014 08:56 PM |
| Use elseif, otherwise this will glitch horrible. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 08:57 PM |
| No it won't..? Elseif is used if I want to separate into one value, I just want separate values... Seriously.. read the script.... IT's meant to have all those values... |
|
|
| Report Abuse |
|
|
| |
|
Nigel217
|
  |
| Joined: 09 Apr 2011 |
| Total Posts: 570 |
|
|
| 01 Jan 2014 09:08 PM |
| You could try finding the UserID, don't know if that would work. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Jan 2014 09:13 PM |
The error, obviously, is info.TextLabel.Text = print(x.." ".."Corus: "..y.." ".."Sable: "..z.." ".."Shock Troopers: "..a.." ".."WEC: "..b)
You don't need to print anything. Actually, if you just remove the word print, that might work.
Print is only ever to output. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 09:15 PM |
| I know little scripting, as I'm learning but is the Group connected to the script? |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 09:16 PM |
| I was actually looking at that part and it looked fishy |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 09:16 PM |
info.TextLabel.Text = (x.." ".."Corus: "..y.." ".."Sable: "..z.." ".."Shock Troopers: "..a.." ".."WEC: "..b)
|
|
|
| Report Abuse |
|
|
LynixF
|
  |
| Joined: 03 Jul 2012 |
| Total Posts: 604 |
|
|
| 01 Jan 2014 09:18 PM |
What is game.Workspace.OfficeSee.Value
|
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 10:46 PM |
| I tried without print, same error. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 10:49 PM |
| if player:GetRoleInGroup(ID) ~= "Guest" then |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 11:00 PM |
| The officesee value is a value in workspace (StringValue) that contains the name of the person currently being let into the office. I need it to transfer the name accross two scripts, one script when I use the command see/(Person you want to see's name here) to the script that finds all the group values in order to change the GUI text. It just comes up with an error when I use it saying that it is attempting to call userdate, and does not do the script. |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 01 Jan 2014 11:48 PM |
| you cant assign a properry to a variable |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 01 Jan 2014 11:51 PM |
| also tthe print() isn't necessary |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Jan 2014 04:33 PM |
when you're changing text you just do a string not print(string) so basically do gui.Text = string |
|
|
| Report Abuse |
|
|