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
 

No errors... It wont work..

Previous Thread :: Next Thread 
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
13 Oct 2014 05:44 PM
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Button1Down:connect(function()
if mouse.Target == game.Workspace.FEEDME then
script.Parent:Destroy()
game.Workspace.FEEDME.FOOD.Value = game.Workspace.FEEDME.FOOD.Value - 1



end
end)
Report Abuse
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
13 Oct 2014 05:50 PM
b1
Report Abuse
AhtnamasStudio is not online. AhtnamasStudio
Joined: 15 Jan 2014
Total Posts: 1104
13 Oct 2014 05:51 PM
try this
if mouse.Target.Name == "FEEDME" then
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
13 Oct 2014 05:52 PM
Which is the part that isn't working?
Report Abuse
AhtnamasStudio is not online. AhtnamasStudio
Joined: 15 Jan 2014
Total Posts: 1104
13 Oct 2014 05:53 PM
also if

game.Workspace.FEEDME.FOOD.Value = game.Workspace.FEEDME.FOOD.Value - 1
is not working then
try this

d = false
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Button1Down:connect(function()
if mouse.Target == game.Workspace.FEEDME then
if d == false then
d = true

game.Workspace.FEEDME.FOOD.Value = game.Workspace.FEEDME.FOOD.Value - 1
script.Parent:Destroy()



end
d = false
end)
Report Abuse
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
13 Oct 2014 05:54 PM
nvm there is a error the mousebutton1down, this is a tool btw
Report Abuse
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
13 Oct 2014 05:56 PM
q.q
Report Abuse
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
13 Oct 2014 06:00 PM
............
Report Abuse
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
13 Oct 2014 06:04 PM
HELP OMFG
Report Abuse
AhtnamasStudio is not online. AhtnamasStudio
Joined: 15 Jan 2014
Total Posts: 1104
13 Oct 2014 06:16 PM
Chill lol :)

local plr = game.Players.LocalPlayer
local char = Workspace:WaitForChild(plr.Name)
local plyr = game.Workspace:FindFirstChild(plr.Name)
local mouse = plr:GetMouse()
target= mouse.Target
function onKeyDown(key)
if mouse.Target.Name =="FEEDME" then
game.Workspace.FEEDME.FOOD.Value = game.Workspace.FEEDME.FOOD.Value - 1
script.Parent:Destroy()

end
end
mouse.KeyDown:connect(onKeyDown)
Report Abuse
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
13 Oct 2014 06:27 PM
19:31:00.461 - Players.Player1.Backpack.Taco.LocalScript:8: attempt to index field 'Target' (a nil value)
Report Abuse
AhtnamasStudio is not online. AhtnamasStudio
Joined: 15 Jan 2014
Total Posts: 1104
13 Oct 2014 06:31 PM
I had it in a normal script try switching from local to normal also you can add this
if mouse.Target ~= nil then
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
13 Oct 2014 06:35 PM
It's a tool!

Tool.Enabled:connect (function () -- fires whenever the left mouse button is clicked (tools only)
if game.Players.LocalPlayer:GetMouse ().Target.Name == "IFORGOT" then
--increase value
end
end)
Report Abuse
Dralian is not online. Dralian
Joined: 21 Mar 2013
Total Posts: 7624
13 Oct 2014 07:44 PM
hi fire
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