|
| 17 Feb 2013 05:24 PM |
local player = game.Players.LocalPlayer trying to get this to show the tip when you hit the key t but it wont work, only in solo but not live please help
local character = player.Character.Torso local mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key) if key == "t" then local p = character.Parent.Name local l = game.Players:FindFirstChild(p) if l then print (p .. ' has been found!') local r = l.PlayerGui.PNGui.PlayerLabel r.Text = p .. " Has been found" r.Visible = true wait(3) r.Visible = false l.PlayerGui.TipGui.AllTips.Visible = true end end
|
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Feb 2013 05:26 PM |
trying to get this to show the tip when you hit the key t but it wont work, only in solo but not live please help
local player = game.Players.LocalPlayer local character = player.Character.Torso local mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key) if key == "t" then local p = character.Parent.Name local l = game.Players:FindFirstChild(p) if l then print (p .. ' has been found!') local r = l.PlayerGui.PNGui.PlayerLabel r.Text = p .. " Has been found" r.Visible = true wait(3) r.Visible = false l.PlayerGui.TipGui.AllTips.Visible = true end end
|
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 17 Feb 2013 05:28 PM |
"local character = player.Character.Torso
local p = character.Parent.Name local l = game.Players:FindFirstChild(p) if l then "
Character.Parent is Character, not player. Because you set the variable to the Character's torso, the torso's parent is Character. Which is not in game.Players
|
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 17 Feb 2013 05:29 PM |
| whoops, my mistakes. Ruff day |
|
|
| Report Abuse |
|
|
| |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 17 Feb 2013 05:34 PM |
wait(2) local player = game.Players.LocalPlayer local mouse = player:GetMouse()
mouse.Button1Down:connect(function(key) if key == "t" then print (player.Name .. ' has been found!') local r = player.PlayerGui.PNGui.PlayerLabel r.Text = player .. " Has been found" r.Visible = true wait(3) r.Visible = false player.PlayerGui.TipGui.AllTips.Visible = true end end)
|
|
|
| Report Abuse |
|
|
|
| 17 Feb 2013 05:36 PM |
| do i need to put it in anywhere other than the workspace to get it to work? |
|
|
| Report Abuse |
|
|