Wackyy2
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 18 |
|
|
| 21 Mar 2012 04:27 AM |
| Well, I'm a newbie to scripting. If you look at my place, you can see I've done something with the scripting. I've created a brick which gives you awards for finding it. I want it to give ether 500HP or building tools. I've sorted out health, but do not know how to do the building tools, as in Move, Copy, Delete. Could someone give me the code for doing this or hint me in the right direction? |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2012 04:38 AM |
put the tools in lighting
and then do this
script.Parent.Touched:connect(function(p) local h=p.Parent:FindFirstChild("Humanoid") if h~=nil then local p=game.Players:FindFirstChild(h.Parent.Name) local c=game.Lighting["TOOL NAME"]:clone() c.Parent=p.Backpack end end)
sorry might have made it a bit complicated for you :P |
|
|
| Report Abuse |
|
|
Wackyy2
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 18 |
|
|
| 21 Mar 2012 04:39 AM |
| My mistake - I meant the code that upon LeftClick would give the player Building tools, much like the common command "givebtools/PlayerName". |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2012 04:42 AM |
| not sure about the left click there .. |
|
|
| Report Abuse |
|
|
Wackyy2
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 18 |
|
|
| 21 Mar 2012 04:42 AM |
I'm using the DialogueChoiceSelected code for it. Would this make any difference? Here: http://wiki.roblox.com/index.php/DialogChoiceSelected_(Event) |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2012 04:50 AM |
| I see now .. post the code and I will see. |
|
|
| Report Abuse |
|
|
Wackyy2
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 18 |
|
|
| 21 Mar 2012 08:28 AM |
workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "isplayer" then player.Character.Humanoid.Health = 500 end end)
This is the code I'm using for the 500HP thing. How would one edit this to give them building tools? |
|
|
| Report Abuse |
|
|