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 
gandhi1234 is not online. gandhi1234
Joined: 24 Apr 2011
Total Posts: 39
11 Aug 2012 03:17 PM
So the wiki doesn't help me at all at scripting, but I joined a couple of some Scripting Hepers group and they said that go to their LuaLearners webpage.
I'm doing great so far.
But this script looks worng. So I tested it. And I was right, something is wrong.
This is the script:

function onTouched(MyPartEats)
local h = Part.Parent:findFirstChild("Humanoid")
if h ~= nil then
h.Health = 0

local p = Instance.new("Message",game.Workspace)
p.Text = "Die!"

game.Workspace.Part.Color = Color3.new(math.random(0,255), math.random(0,255), math.random(0,255))

game.Workspace.Part.Position = Vector3.new(0, 20, 0)

end
end

script.Parent.Touched:connect(onTouched)

And yes, the Part is named MyPartEats. This was the assignment that told me what to do. Here is what the assignment is.

"Here is your assignment.

Make a brick that does the following:

Change the color when touched.

Kills the player that touched it.

Moves the brick to a random location between 0 and 20 on all axis.

Inserts a message into workspace that says somebody touched the part."
Report Abuse
gandhi1234 is not online. gandhi1234
Joined: 24 Apr 2011
Total Posts: 39
11 Aug 2012 03:18 PM
Oooh I found some errors.
Report Abuse
gandhi1234 is not online. gandhi1234
Joined: 24 Apr 2011
Total Posts: 39
11 Aug 2012 03:21 PM
Nevermind, it's works. FINALLY!! A SCRIPT THAT I WROTE WORKS!!! VICTORY IS MINE!
YES!
YES!
YES!
YES!
YES!
YES!
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