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: @ mic144

Previous Thread :: Next Thread 
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:03 PM
That the title says. :/


~I ate Telamon's chicken~
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:04 PM
SCRIPT*


~I ate Telamon's chicken~
Report Abuse
CreamPiess is not online. CreamPiess
Joined: 30 Nov 2012
Total Posts: 137
05 Dec 2012 09:05 PM
Elaborate please. Help? If that is whart you need, ask.
Report Abuse
CreamPiess is not online. CreamPiess
Joined: 30 Nov 2012
Total Posts: 137
05 Dec 2012 09:06 PM
What*

And no im not new, I had a banned profile that had joined in 2008. Im an expert, really.
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:08 PM
I got in Play solo. Output was not open. I opened it and closed out the play solo. (I have to re- open it to make sure I didn't miss anything) Now its out. Logging, not logging. Base and a one part. Script in that one small part set to connect ontouched. I walk over it, nothing happens in th eoutput. Not a single thing. HELP!?!!?


~I ate Telamon's chicken~
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:10 PM
Script:
Don't correct it I'm trying on my own. Its an assignment from my scripting teacher.

b = script.Parent
a = false
function onTouched(h)
e = game.Workspace:GetChildren()
c = h.Parent:FindFirstChild("Humanoid")
p = game.Players:GetPlayerFromCharacter(h.Parent)
d = Instance.new("Message")
if a == true then
d.Text = "YOU BROKE THE GAME!!"
wait(1)
if e.ClassName == "Part" then
e.Position = CFrame.new(.9, .9, .9)
wait(1)
d:Remove()
else
c.Health = 0
wait(1)
d.Text = "GO AWAY!"
wait(1)
d:Remove()
wait()
end
end
end
script.Parent.Touched:connect(onTouched)






~I ate Telamon's chicken~
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:11 PM
OMG I see an error!!! Forgot to set the message's parent >_<

but anywayas still help!!


~I ate Telamon's chicken~
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
05 Dec 2012 09:16 PM
Everything is put into that one if statement. So, if a == true, None of the statements fire.
Report Abuse
CreamPiess is not online. CreamPiess
Joined: 30 Nov 2012
Total Posts: 137
05 Dec 2012 09:17 PM
At a glimpse, this script looks like a server breaker.. Nevermind that. First i would NOT use a,b,c abbreviations.. That's just wierd. Please write full length first :) That means NO abbreviations like [a = die] and using a WHATSOEVER. Try now.
Report Abuse
CreamPiess is not online. CreamPiess
Joined: 30 Nov 2012
Total Posts: 137
05 Dec 2012 09:19 PM
If not, well your script may be missing a small part. did you forget to add anything? Or was this written by scrap.
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:21 PM
Called using variables? Trying to shorten my script.
I noticed when I changd the messge to Instance.new("Message",game.Workspace)
I walked over the brick and a bunch of messages came up.. Time for debounce,
But the point of the script is so when a person walks over it the script approves him or disaproves him. Aproves = message that he broke the game and all bricks cframe.
If not aproved msg = go away and character dies.


~I ate Telamon's chicken~
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:21 PM
Just made it.


~I ate Telamon's chicken~
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:23 PM
it works now but it uses both messages. I think I have to use elseif???


~I ate Telamon's chicken~
Report Abuse
dradra44 is not online. dradra44
Joined: 11 Jul 2008
Total Posts: 1040
05 Dec 2012 09:24 PM
I see it now.

b = script.Parent
a = false
function onTouched(h)
e = game.Workspace:GetChildren()
c = h.Parent:FindFirstChild("Humanoid")
p = game.Players:GetPlayerFromCharacter(h.Parent)
d = Instance.new("Message")
if a == true then
d.Text = "YOU BROKE THE GAME!!"
wait(1)
if e.ClassName == "Part" then <------ I would add a for statement. Look at bottom.

e.Position = CFrame.new(.9, .9, .9)
wait(1)
d:Remove()
else
c.Health = 0
wait(1)
d.Text = "GO AWAY!"
wait(1)
d:Remove()
wait()
end
end
end
script.Parent.Touched:connect(onTouched)




for i=1, #e do
if e[i].ClassName == "Part" then
e[i].Position = CFrame.new(.9, .9, .9)
wait(1)
d:Remove()
else
c.Health = 0
wait(1)
d.Text = "GO AWAY!"
wait(1)
d:Remove()
wait()
end
end


You need something to look at, right now it is looking at game.Workspace as a whole, the for i = 1, #e do statement basically says:
Forever every 1 (i) thing in game.Workspace:GetChildren() do this:
Report Abuse
dradra44 is not online. dradra44
Joined: 11 Jul 2008
Total Posts: 1040
05 Dec 2012 09:25 PM
Oh, didn't see you fixed it, also though, there is no place toggling a? I would fix that.
Report Abuse
dradra44 is not online. dradra44
Joined: 11 Jul 2008
Total Posts: 1040
05 Dec 2012 09:27 PM
Just reading all the responses. Yes, use elseif.

if a == true then
-- script
elseif a == false then
-- script
end


I am sure you knew how to do it, but just incase.. ;)
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:29 PM
if a == false then


thats what I used it for.



~I ate Telamon's chicken~
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
05 Dec 2012 09:29 PM
@dr, that's what I was trying to say above. He just said he didn't want us to give him the answer to it, So I gave a hint :p
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:31 PM
Thanks, I'm barely learning after all these years of playing! xD


~I ate Telamon's chicken~
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
05 Dec 2012 09:32 PM
@ SAm
I know a little bit of lua but not this much. Thanks for helping me everyone!!


~I ate Telamon's chicken~
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