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: Interact tool

Previous Thread :: Next Thread 
XxStarverxX is not online. XxStarverxX
Joined: 08 Oct 2010
Total Posts: 711
30 Oct 2012 01:22 PM
[ Content Deleted ]
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
30 Oct 2012 01:24 PM
tool = script.Parent
tool.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
local click = mouse.Target
if click.Parent.Name == "noob" then
c = game.Lighting.ShopGui:clone()
c.Parent = game.Players:findFirstChild(tool.Parent.Name).PlayerGui
elseif click.Parent.Name ~= "noob" then
b = Instance.new("Hint")
b.Parent = game.Players:findFirstChild(tool.Parent.Name).PlayerGui
b.Text="Some Text here"
end
end)
end)
Report Abuse
XxStarverxX is not online. XxStarverxX
Joined: 08 Oct 2010
Total Posts: 711
30 Oct 2012 01:26 PM
[ Content Deleted ]
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
30 Oct 2012 01:27 PM
Ah, you see, if the mouse is looking into the Sky, there is NO mouse.Target. Do this:

tool = script.Parent
tool.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
if mouse.Target then
local click = mouse.Target
if click.Parent.Name == "noob" then
c = game.Lighting.ShopGui:clone()
c.Parent = game.Players:findFirstChild(tool.Parent.Name).PlayerGui
elseif click.Parent.Name ~= "noob" then
b = Instance.new("Hint")
b.Parent = game.Players:findFirstChild(tool.Parent.Name).PlayerGui
b.Text="Some Text here"
end
end
end)
end)
Report Abuse
XxStarverxX is not online. XxStarverxX
Joined: 08 Oct 2010
Total Posts: 711
30 Oct 2012 01:29 PM
[ Content Deleted ]
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
30 Oct 2012 01:29 PM
No problem.
Report Abuse
XxStarverxX is not online. XxStarverxX
Joined: 08 Oct 2010
Total Posts: 711
30 Oct 2012 01:41 PM
[ Content Deleted ]
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
30 Oct 2012 01:46 PM
tool = script.Parent
local CanClick=true
local delay=5
tool.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
if mouse.Target then
if CanClick then
CanClick=false
local click = mouse.Target
if click.Parent.Name == "Shopkeeper" then
c = game.Lighting.ShopGui:clone()
c.Parent = game.Players:findFirstChild(tool.Parent.Name).PlayerGui
wait(delay)
CanClick=true
elseif click.Parent.Name ~= "Shopkeeper" then
CanClick=false
b = Instance.new("Hint")
wait()
b.Parent = game.Players:findFirstChild(tool.Parent.Name).PlayerGui
b.Text="Remember, you must click on a shopkeeper to interact with him/her!"
wait(1)
b:Destroy()
wait(delay-1)
CanClick=true
end
end
end)
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