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: Correction.

Previous Thread :: Next Thread 
Wackyy2 is not online. 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
DragonFang1 is not online. DragonFang1
Joined: 02 Apr 2009
Total Posts: 1068
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 is not online. 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
DragonFang1 is not online. DragonFang1
Joined: 02 Apr 2009
Total Posts: 1068
21 Mar 2012 04:42 AM
not sure about the left click there ..
Report Abuse
Wackyy2 is not online. 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
DragonFang1 is not online. DragonFang1
Joined: 02 Apr 2009
Total Posts: 1068
21 Mar 2012 04:50 AM
I see now .. post the code and I will see.
Report Abuse
Wackyy2 is not online. 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
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