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
 

Re: Why wont this work?

Previous Thread :: Next Thread 
billybobtyjoseph is not online. billybobtyjoseph
Joined: 14 Aug 2011
Total Posts: 1083
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
billybobtyjoseph is not online. billybobtyjoseph
Joined: 14 Aug 2011
Total Posts: 1083
17 Feb 2013 05:25 PM
BUMP
Report Abuse
billybobtyjoseph is not online. billybobtyjoseph
Joined: 14 Aug 2011
Total Posts: 1083
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 is not online. 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 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
17 Feb 2013 05:29 PM
whoops, my mistakes. Ruff day
Report Abuse
billybobtyjoseph is not online. billybobtyjoseph
Joined: 14 Aug 2011
Total Posts: 1083
17 Feb 2013 05:30 PM
so can u fix it then?
Report Abuse
miz656 is not online. 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
billybobtyjoseph is not online. billybobtyjoseph
Joined: 14 Aug 2011
Total Posts: 1083
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
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