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: My First Script.

Previous Thread :: Next Thread 
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:32 PM
Works, take a look of it.

local plyr = Instance.new("Part") -- I don't know what I did here. Rofl.
if plyr == juanda123 then
plyr.Humanoid.Health = 150
end
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Dec 2011 09:34 PM
That wouldn't work because

1) You don't need an end

2) You didn't define parts name

3) Part doesn't have a humanoid in it :l

Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:34 PM
I know that, I just saw the Output, no errors, it's good writed.
Report Abuse
TameDrone is not online. TameDrone
Joined: 09 Dec 2010
Total Posts: 1006
27 Dec 2011 09:35 PM
My first script :)



While true do

game.Workspace.Base.Transperency = 1

wait(.5)

game.workspace.Base. Transperency = 0
Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:37 PM
Any ideas for a script? (Only ideas, not helping, I'll make a thread if help)
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Dec 2011 09:38 PM
Wait, lol I was wrong. You do need an end for the if statement :l

Am I getting tired alrighty?

But @creatorofthread

Do you want me to improve on that script?
Report Abuse
TameDrone is not online. TameDrone
Joined: 09 Dec 2010
Total Posts: 1006
27 Dec 2011 09:38 PM
Are you the best scripter known to ROBLOXians?
Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:39 PM
Miz, yeah pl0x.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Dec 2011 09:43 PM
local plyr = Instance.new("Part")
plyr.Name = "juanda123"
local h = Instance.new("Humanoid")
h.Parent = plyr
if plyr == juanda123 then
plyr.Humanoid.Health = 150
end

Try that.

Pretty sure it would work but than again I kinda have a headache right now :P
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
27 Dec 2011 09:43 PM
@Tame Are you sure your first script works? *Transparency*

~ [I don't script scripts; I script IMPORTED scripts.] [The inner machinations of my mind are an enigma.] ~
Report Abuse
TameDrone is not online. TameDrone
Joined: 09 Dec 2010
Total Posts: 1006
27 Dec 2011 09:44 PM
I didn't go to studio, copy and then paste it onto the thread, I just mispelled it =/
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
27 Dec 2011 09:45 PM
@miz
Dont you need a string:
juanda123 = "juanda123"
and
if plyr.Name == juanda123 then

???

ˈ˟ˈ About me? I got Remove()'d but came back for I was not Destroy()'d :3 ˈ˟ˈ
Report Abuse
TameDrone is not online. TameDrone
Joined: 09 Dec 2010
Total Posts: 1006
27 Dec 2011 09:45 PM
And actually my first script started with:

game.script.parent.workspace

But obviously it didn't work
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Dec 2011 09:47 PM
local plyr = Instance.new("Part")
plyr.Name = "juanda123"
plyr.Parent = Workspace--Forgot to set Parts parent.
local h = Instance.new("Humanoid")
h.Parent = plyr
if plyr == juanda123 then
plyr.Humanoid.MaxHealth = 150
end

There :P Once again, I have a headache.
Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:49 PM
Lol, that I clicked PLAY and inserted me a brick :P
Due' Instance.new("Part")
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
27 Dec 2011 09:51 PM
Are you just telling us your first code, or you're telling us to help you fix it?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Dec 2011 09:52 PM
Lol, 3rd adjustment XD

I must be really tired :l

local plyr = Instance.new("Part")
plyr.Name = "juanda123"
plyr.Parent = Workspace--Forgot to set Parts parent.
local h = Instance.new("Humanoid")
h.Parent = plyr
if plyr.Name == "juanda123" then
plyr.Humanoid.MaxHealth = 150
end

If I get this wrong one more time I should just go to sleep :l

Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:52 PM
Maybe both...
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Dec 2011 09:54 PM
@Juanda

Try out my 3rd script. Pretty sure it works :P
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
27 Dec 2011 09:55 PM
"local plyr = Instance.new("Part") -- I don't know what I did here. Rofl.
if plyr == juanda123 then
plyr.Humanoid.Health = 150
end"

I'm confuse.
What are you trying to do?

I see your tag is 'plyr' and plyr is a Part.
If plyer is you, then the 'plyr' will get 150 health.

Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:56 PM
I changed the "juanda123" to Player, tested and my humanoid Health was 100.
Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:57 PM
@Avobe was to Miz..
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
27 Dec 2011 09:58 PM
Oh!
So you want to get 150 health when you join your game?


game.Players.PlayerAdded:connect(function(plyr)
if plyr.Name == "juanda123" then
plyr.Character.Humanoid.MaxHealth = 150
plyr.Character.Humanoid.Health = 150
end
end)
Report Abuse
juanda123 is not online. juanda123
Joined: 11 Jun 2010
Total Posts: 7685
27 Dec 2011 09:59 PM
@Roant, I forgot that thing..... >.>
Well, thanks.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Dec 2011 09:59 PM
Ok juanda, this is confusing. It looks like this scritp isn't suppose to work when it does :l
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