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: Scripting help.

Previous Thread :: Next Thread 
alaneasy is not online. alaneasy
Joined: 13 Aug 2012
Total Posts: 55
08 Mar 2013 08:15 AM
Um,I want to make a script that when you touch a morph it gives you more health or walkspeed. Anyone willing to help?
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
08 Mar 2013 08:20 AM
First of all set up an function connected to an event.

script.Parent.Touched:connect(function(Hit)

end

Let it changed the health of the humanoid when touched. (make sure there is a humanoid!)
Report Abuse
alaneasy is not online. alaneasy
Joined: 13 Aug 2012
Total Posts: 55
08 Mar 2013 08:26 AM
What?
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
08 Mar 2013 08:28 AM
set*
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
08 Mar 2013 03:34 PM
500, script.Parent.Touched:connect(function(Hit) --WHERE'S THE OTHER BRACKET?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Mar 2013 03:36 PM
@smiley

It's an anonymous function, and there shouldn't be another parenthesis there. Where is should be is after the end;


    script.Parent.Touched:connect(function(Hit)
    
    --Code
    
    end ) --Here

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 03:47 PM
Because he replied "What?" to very basic scripting, I don't think he'll understand anything we tell him.
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
08 Mar 2013 04:49 PM
Knight, that's what I thought it should be. :)
Report Abuse
alaneasy is not online. alaneasy
Joined: 13 Aug 2012
Total Posts: 55
09 Mar 2013 01:42 PM
And If I do?
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
09 Mar 2013 05:55 PM
I forgot to add it. ._.
Report Abuse
koen523 is not online. koen523
Joined: 23 Feb 2011
Total Posts: 4026
10 Mar 2013 05:53 PM
Just put a health changer script in the brick you touch. Just a second script.
Report Abuse
antimatterkill is not online. antimatterkill
Joined: 09 Jul 2012
Total Posts: 4
10 Mar 2013 06:36 PM
Im brand new to scripting and Im hopelessly lost trying to figure out haw it works.
how can i create a simple script? i just want to make a brick with health, so i put a slate block in my place using studio, and called it slate stone 1 (yes i put spaces between slate and stone) then i typed into the command bar slate stone 1.health=100
how do i get this to work?!
Report Abuse
antimatterkill is not online. antimatterkill
Joined: 09 Jul 2012
Total Posts: 4
10 Mar 2013 06:58 PM
ok i think i might be getting a little closer, i tried to create a script based on examples i have seen. tell me if this will work. if it will not work, please tell me why and how to fix it.

healthscripttest is the object i am trying to script with. it is a normal slate block that is 4x4x4studs

this is the "script"

healthscripttest.maxhealth=100.health=100
if.health=0(cancollide=true)

will that work or is it still way off?
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
11 Mar 2013 02:06 AM
@523, Tha'ts using FMs. Go away.
Report Abuse
basw333 is not online. basw333
Joined: 27 Oct 2012
Total Posts: 11
11 Mar 2013 04:25 AM
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
Report Abuse
antimatterkill is not online. antimatterkill
Joined: 09 Jul 2012
Total Posts: 4
11 Mar 2013 06:05 PM
just found somthing wrong with my own script that my freind pointed out.
i put cancollide as true. not what you want if you are trying to get the thing to fall through the ground. i also need to know how to add the script.
can anyone help me with this?
Report Abuse
koen523 is not online. koen523
Joined: 23 Feb 2011
Total Posts: 4026
16 Mar 2013 05:33 PM
Koen you go away. <_<
Report Abuse
kaydude1990 is not online. kaydude1990
Joined: 01 Nov 2012
Total Posts: 4
31 Mar 2013 02:57 AM
hpmmmmmmmmmm
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
31 Mar 2013 03:45 AM
This might go wrong but i give it a shot.

script.Parent.Touched:connect(function(Hit)
hit.Parent.FindFirstChild("Humanoid")
if Humanoid then
hit.Parent.Humanoid.Maxhealth = 150
hit.Parent.Humanoid.Health = 50

end
Report Abuse
Epic1230 is not online. Epic1230
Joined: 07 Dec 2011
Total Posts: 289
31 Mar 2013 08:01 AM
You didn't write any variables for Humanoid. Also, you wrote "Hit" with a capital, and you wrote the rest as "hit" with no capitals.
Correct one:

script.Parent.Touched:connect(function(hit)
humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid ~= nil then
humanoid.MaxHealth = Number
humanoid.Health = Number
humanoid.WalkSpeed = Number
end
end)

I'm pretty sure that's correct, if it doesn't work, I'm sorry!
Report Abuse
DjM4x is not online. DjM4x
Joined: 26 Mar 2013
Total Posts: 71
31 Mar 2013 09:28 AM
....
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