|
| 30 Mar 2013 08:43 PM |
hey guys, i need some help with a script, i know how to script like the basics.
but i don't know functions and onTouched you know. well i'm making a game when you touch a treasure chest it will give you 1 treasure. i don't know how to do this really so if anyone could help me out that would be great.
i can't trust the internet anymore. |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 08:45 PM |
bump
i can't trust the internet anymore.
|
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 09:01 PM |
please?
i can't trust the internet anymore. |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 09:03 PM |
local.Ontouch.connect.Humoid.Value = 0
|
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 09:04 PM |
Wait nvm
local.Ontouch.connect.chancevalue.Points = 5 |
|
|
| Report Abuse |
|
|
dragon188
|
  |
| Joined: 17 Dec 2008 |
| Total Posts: 3276 |
|
|
| 30 Mar 2013 09:04 PM |
| Look in models for a point giving block. Take the script of of the block and put it inside the treasure chest. Insert a point leaderboard into the game and edit the script of the leaderboard to say "Treasure" instead of "points". Also go into the point giving block and look for a part that should say points or money or something and change it to treasure. |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Mar 2013 09:05 PM |
its changevalue no chancevalue, sorry
|
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 09:14 PM |
Try this script to help you understand functions and onClicked:
a = game.Workspace:finFirstChild("Part")
function onClicked() wait(0.05) a.Transparency = 0.1 wait(0.05) a.Transparency = 0.2 wait(0.05) a.Transparency = 0.3 wait(0.05) a.Transparency = 0.4 wait(0.05) a.Transparency = 0.5 wait(0.05) a.Transparency = 0.6 wait(0.05) a.Transparency = 0.7 wait(0.05) a.Transparency = 0.8 wait(0.05) a.Transparency = 0.9 wait(0.05) a.Transparency = 1 wait(0.05) a.CanCollide = false end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
---------------------------------------------------------------------------------------------------------------------------
Insert this script into an empty game with a brick that says "Part". Inside the brick, you will insert a ClickDetector via services. When you enter the game and test, it should work.
---------------------------------------------------------------------------------------------------------------------------
Look at several examples of this same script in this place I made: http://www.roblox.com/Model-Making-place?id=63053260 |
|
|
| Report Abuse |
|
|
| |
|