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: touch script help?

Previous Thread :: Next Thread 
stealthcooldude4 is not online. stealthcooldude4
Joined: 21 Aug 2012
Total Posts: 57
09 Sep 2013 08:54 PM
well i just started making games and i am making a game called ROBLOX Fishing. i need to know a script, where if your holding a fish and it touches the object it gives you 1 point (in this i call it coins)? i dont know if any of you know this but please help
Report Abuse
stealthcooldude4 is not online. stealthcooldude4
Joined: 21 Aug 2012
Total Posts: 57
09 Sep 2013 08:58 PM
to make it easier:

when the fish touches the part "bin collector" it gives you a coin, on the leaderboard.
Report Abuse
superomyuo is not online. superomyuo
Joined: 14 Aug 2010
Total Posts: 11117
09 Sep 2013 09:00 PM
fish.touchy.part[binclleter].then,{blingbling}.moneys.end()

Thou creeping bat-fowling bugbear!
Report Abuse
stealthcooldude4 is not online. stealthcooldude4
Joined: 21 Aug 2012
Total Posts: 57
09 Sep 2013 09:03 PM
@super

is the {blingbling} thing supposed to be the money, can i rename it?
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
09 Sep 2013 09:05 PM
@Stealth

He's trolling..


partyoutouch = game.Workspace.Part --replace with whatever

--put this in fish

script.Parent.Touched:connect(function(hit)
if hit.Name == (partyoutouch).Name
end
end)


Something like that.
Report Abuse
stealthcooldude4 is not online. stealthcooldude4
Joined: 21 Aug 2012
Total Posts: 57
09 Sep 2013 09:06 PM
@arkose

Thanks, i will feature you in my credits for that
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
09 Sep 2013 09:07 PM
Ok first of all, super's script is not even Lua. Second of all, you would use the .Touched event in a function to check if the object's name is "Fish" and if it is then award the player holding the fish 1 coin.
Report Abuse
stealthcooldude4 is not online. stealthcooldude4
Joined: 21 Aug 2012
Total Posts: 57
10 Sep 2013 04:05 PM
@savior
Okay.

also @arkose,

Is there a part in there where it gives you 1 coin (stat on leaderboard)?
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
10 Sep 2013 04:10 PM
partyoutouch = game.Workspace.Part --replace with whatever

--put this in fish

script.Parent.Touched:connect(function(hit)
if hit.Name == (partyoutouch).Name then
local name=hit.Parent.Name
local person=Game.Players:FindFirstChild(name)
if person then person.leaderstats.Coins.Value=person.leaderstats.Coins.Value+1 --replace Coins with whatever the currency's name is
end
end
end)
Report Abuse
funnymouse7 is not online. funnymouse7
Joined: 17 Mar 2011
Total Posts: 1741
10 Sep 2013 04:12 PM
partyoutouch = game.Workspace.Part --replace with whatever

--put this in fish

script.Parent.Touched:connect(function(hit)
if hit.Name == (partyoutouch).Name then
a=game.Players:findFirstChild(hit.Name)
if a then
partyoutouch:remove()--didnt use destroy just in case
a.leaderstats.coins = a.leaderstats.coins + 1
end
end
end)



that should work try it not 100% sure though
Report Abuse
stealthcooldude4 is not online. stealthcooldude4
Joined: 21 Aug 2012
Total Posts: 57
10 Sep 2013 04:22 PM
@funny

That was more helpful, Ima put you in credits for that.
Report Abuse
funnymouse7 is not online. funnymouse7
Joined: 17 Mar 2011
Total Posts: 1741
10 Sep 2013 04:27 PM
thank you
Report Abuse
stealthcooldude4 is not online. stealthcooldude4
Joined: 21 Aug 2012
Total Posts: 57
10 Sep 2013 04:28 PM
@funny

No problem. :D
Report Abuse
08C is not online. 08C
Joined: 26 Jan 2013
Total Posts: 847
10 Sep 2013 04:33 PM
[ Content Deleted ]
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