of     1   

crate109
#139875405Thursday, July 10, 2014 3:07 PM GMT

It breaks at the line 9, it should get information from the player I am targeting. I am trying to reach the Players.player from the Character in workspace I am targeting. What is the problem? MOS=game.Players.LocalPlayer:GetMouse() while wait() do if MOS.Target then if MOS.Target.Name ~=("Tool") and MOS.Target.Name ~=("Hat") and MOS.Target.Name ~=("Sabre") then if MOS.Target.Parent:FindFirstChild("Humanoid") or MOS.Target.Parent.Parent:FindFirstChild("Humanoid") and MOS.Target.Parent.className~=("Tool") and MOS.Target.Parent.className~=("Hat") then script.Parent.InfoGuiverGUI.InfoGiver.Visible = true script.Parent.InfoGuiverGUI.InfoGiver.PlayerName.Text = "Player: " .. MOS.Target.Parent.Name if game.Players:GetPlayerFromCharacter(game.Workspace.Player):IsInGroup("883491") then script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "Insigna: " .. game.Players:GetPlayerFromCharacter(game.Workspace.Player):GetRoleInGroup("883491") else script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "This is not a US soldier!" end if MOS.Target.Parent.Humanoid.Health 0 then script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Wounded" elseif MOS.Target.Parent.Humanoid.Health <= 0 then script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Dead" else script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Healthy" end else script.Parent.InfoGuiverGUI.InfoGiver.Visible = false end end end
blockoo
#139878969Thursday, July 10, 2014 3:54 PM GMT

Could you mark the line that is causing the problem?
crate109
#139889569Thursday, July 10, 2014 5:44 PM GMT

if game.Players:GetPlayerFromCharacter(game.Workspace.Player):IsInGroup("883491") then script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "Insigna: " .. game.Players:GetPlayerFromCharacter(game.Workspace.Player):GetRoleInGroup("883491") else script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "This is not a US soldier!" end Everything else works, I tried. I just don't know how to get Player information from my Target (Character, the Workspace player)
blockoo
#139899085Thursday, July 10, 2014 7:08 PM GMT

What exactly is this script in? In a tool, hopperbin, block, ...?
crate109
#139924367Thursday, July 10, 2014 11:28 PM GMT

It is a LocalScript (alone) in the StarterGui. There is another GUI in the StarterGui. Here is the script: When you put your mouse on a player, in a game (when you hover a player) a GUI pop on your screen (the GUI in the starterGUI). Inside this GUI, you can have the name of the player hover. When you stop hovering the player, the GUI goes back invisible. This part of the script breaks everything: ----------------------- if game.Players:GetPlayerFromCharacter(game.Workspace.Player):IsInGroup("883491") then script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "Insigna: " .. game.Players:GetPlayerFromCharacter(game.Workspace.Player):GetRoleInGroup("883491") else script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "This is not a US soldier!" end ----------------------- I think I'm not using the GetPlayerFromCharacter() thing correctly.
blockoo
#139925861Thursday, July 10, 2014 11:42 PM GMT

If it's in StarterGui, then it will be put into every player's PlayerGui when they join. Instead of using GetPlayerFromCharacter(), try just using game.Players.LocalPlayer
crate109
#139931154Friday, July 11, 2014 12:34 AM GMT

Alright ok I will try this and tell you if it works !! :P
crate109
#139931463Friday, July 11, 2014 12:37 AM GMT

Ohhhh yes it works :DDD Thank you so much! You can't imagine how hard I worked on that script and it is because of you if I completed it :DD Once again, thank you !! Crate109.
blockoo
#139932249Friday, July 11, 2014 12:44 AM GMT

No problem lol
crate109
#139982795Friday, July 11, 2014 1:48 PM GMT

Err... Actually it seems to be working on Edit mode, but when I get on the field with my group members, it doesn't work.... Doesn't work online :/
crate109
#139983748Friday, July 11, 2014 2:08 PM GMT

The problem is, when we put our mouse on someone, we get our own rank lol!
blockoo
#139984356Friday, July 11, 2014 2:20 PM GMT

Oh I see now. Sorry, I misunderstood what you were asking before. Try this: if game.Players:FindFirstChild(game.Workspace.Player.Name) then if game.Players[game.Workspace.Player.Name]:IsInGroup("883491") then script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "Insigna: " .. game.Players[game.Workspace.Player.Name]:GetRoleInGroup("883491") else script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "This is not a US soldier!" end end
crate109
#139984823Friday, July 11, 2014 2:29 PM GMT

Still not working :/
crate109
#139984915Friday, July 11, 2014 2:30 PM GMT

Here is the whole script (A LocalScript in the StarterGUI): MOS=game.Players.LocalPlayer:GetMouse() while wait() do if MOS.Target then if MOS.Target.Name ~=("Tool") and MOS.Target.Name ~=("Hat") and MOS.Target.Name ~=("Sabre") then if MOS.Target.Parent:FindFirstChild("Humanoid") or MOS.Target.Parent.Parent:FindFirstChild("Humanoid") and MOS.Target.Parent.className~=("Tool") and MOS.Target.Parent.className~=("Hat") then script.Parent.InfoGuiverGUI.InfoGiver.Visible = true script.Parent.InfoGuiverGUI.InfoGiver.PlayerName.Text = "Player: " .. MOS.Target.Parent.Name if game.Players:FindFirstChild(game.Workspace.Player.Name) then if game.Players[game.Workspace.Player.Name]:IsInGroup("883491") then script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "Insigna: " .. game.Players[game.Workspace.Player.Name]:GetRoleInGroup("883491") else script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "This is not a US soldier!" end end if MOS.Target.Parent.Humanoid.Health 0 then script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Wounded" elseif MOS.Target.Parent.Humanoid.Health <= 0 then script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Dead" else script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Healthy" end else script.Parent.InfoGuiverGUI.InfoGiver.Visible = false end end end end
wish_z
#139985196Friday, July 11, 2014 2:34 PM GMT

The script loads before the player. Try adding a wait(2) at top
crate109
#139986394Friday, July 11, 2014 2:54 PM GMT

I added wait(3).. still not :/ I don't think that's the prob. Also, when I put my cursor on someone, the GUI does not disappear, as it should do. And no Insigna show up.
crate109
#140030603Friday, July 11, 2014 10:47 PM GMT

This whole script works, but just in Solo mode. Won't run correctly Online: wait(3) MOS=game.Players.LocalPlayer:GetMouse() while wait() do if MOS.Target then if MOS.Target.Name ~=("Tool") and MOS.Target.Name ~=("Hat") and MOS.Target.Name ~=("Sabre") then if MOS.Target.Parent:FindFirstChild("Humanoid") or MOS.Target.Parent.Parent:FindFirstChild("Humanoid") and MOS.Target.Parent.className~=("Tool") and MOS.Target.Parent.className~=("Hat") then script.Parent.InfoGuiverGUI.InfoGiver.Visible = true script.Parent.InfoGuiverGUI.InfoGiver.PlayerName.Text = "Player: " .. MOS.Target.Parent.Name if game.Players.LocalPlayer:IsInGroup("883491") then script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "Insigna: " .. game.Players.LocalPlayer:GetRoleInGroup("883491") else script.Parent.InfoGuiverGUI.InfoGiver.PlayerRank.Text = "This is not a US soldier!" end if MOS.Target.Parent.Humanoid.Health 0 then script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Wounded" elseif MOS.Target.Parent.Humanoid.Health <= 0 then script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Dead" else script.Parent.InfoGuiverGUI.InfoGiver.PlayerHealth.Text = "Status: Healthy" end else script.Parent.InfoGuiverGUI.InfoGiver.Visible = false end end end end
crate109
#140034176Friday, July 11, 2014 11:23 PM GMT

I was told that LocalScript do not work correctly Online, any idea of how I could convert my LocalScript into a Script?

    of     1