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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: whats wrong with this?

Previous Thread :: Next Thread 
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 05:28 PM
nothing happens. dont tell me to "make it more efficient" because i dont care, as long as it works. no errors too

d = false

function freezePlayer(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if d == true then return end
elseif d == false then
d = true
hit.Torso.Anchored = true
hit["Left Arm"].Anchored = true
hit["Right Arm"].Anchored = true
hit.Head.Anchored = true
hit["Left Leg"].Anchored = true
hit["Right Leg"].Anchored = true
wait(4)
hit.Torso.Anchored = false
hit["Left Arm"].Anchored = false
hit["Right Arm"].Anchored = false
hit.Head.Anchored = false
hit["Left Leg"].Anchored = false
hit["Right Leg"].Anchored = false
wait(1)
d = false
end
end

script.Parent.Touched:connect(freezePlayer)
Report Abuse
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 07:07 PM
a
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 07:08 PM
"nothing happens. dont tell me to "make it more efficient" because i dont care, as long as it works. no errors too"

I literally wrote you some functions to make it more efficient kid.

If you don't care get out.
Report Abuse
Chrapnel is not online. Chrapnel
Joined: 01 Feb 2014
Total Posts: 951
21 Sep 2015 07:09 PM
I added one line.

function freezePlayer(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if d == true then return end
elseif d == false then
d = true
hit = hit.Parent
hit.Torso.Anchored = true
hit["Left Arm"].Anchored = true
hit["Right Arm"].Anchored = true
hit.Head.Anchored = true
hit["Left Leg"].Anchored = true
hit["Right Leg"].Anchored = true
wait(4)
hit.Torso.Anchored = false
hit["Left Arm"].Anchored = false
hit["Right Arm"].Anchored = false
hit.Head.Anchored = false
hit["Left Leg"].Anchored = false
hit["Right Leg"].Anchored = false
wait(1)
d = false
end
end
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
21 Sep 2015 07:10 PM
If you want to freeze them all you have to do is anchor their torso
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 07:12 PM
People who don't want to become better coders and make their work more efficient should honestly quit scripting.
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 07:14 PM
People who don't want to become better coders and don't make their work more efficient should honestly quit scripting.

If all you care about is if something works, then you shouldn't even be making a game. You would soon be like 'the game is lagging a lot' and then realize that it was because of that decision you made.

If you don't want to take this advice and quit scripting, get better, and get more efficient.

If you don't care about what I have to say I don't think anyone should care about your problems.
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 07:15 PM
Scripters isn't your

"Hey look my code doesn't work I'll tell them to fix it and not even debug my code, let them do all the work"

place.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
21 Sep 2015 07:19 PM
tru
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
21 Sep 2015 07:20 PM
ugly and inefficient coding

rip

props to boss for helping doe
Report Abuse
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 08:02 PM
@boss

you say i wont learn, yet you just gave me a script which was really confusing and didnt even work

at least explain what it does. and i never said to write out a new script, i asked for someone to find the error. you said mine was inefficient, yet yours was more lines of codes and way more confusing.
Report Abuse
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 08:04 PM
also, my game is pretty simple and it doesnt need a trillion bricks. i dont think its gonna lag from one bad script that only runs once every like 2 mins
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
21 Sep 2015 08:04 PM
put this in 1 script and tell me if it lags or not k?
"while true do end"

morashsPeasant is sleeping
Report Abuse
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 08:07 PM
first, i know its gonna crash my game

but do you see a while loop? no

and theres a debounce, even if its crappy or if its not, its there.
Report Abuse
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 08:11 PM
also i got it to work :) without a nerds help :)
Report Abuse
minerioProgramer is not online. minerioProgramer
Joined: 21 Dec 2012
Total Posts: 432
21 Sep 2015 08:17 PM
Good jib ^_,^
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 08:18 PM
Um?

I gave you a function..
Not an entire script lul.

If you can't comprehend Anchoring all the BaseParts in a Character that touches a Part then I don't know what to say, except that you should learn.

Learning loops is something you should look into.

I also did explain some methods I used.
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 08:18 PM
With that comment you said tho.

I think you should leave this sub forum and never come back, if you aren't going to take advice then get out. We aren't going to help you with your problems if you will be a brat about it.
Report Abuse
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 08:22 PM
"That doesn't make sense.

Something like this:

local HasTouched = false

function Freeze(Directory, bool)
for index, value in pairs(Directory:GetChildren()) do
if value:IsA("BasePart") then
value.Anchored = bool
end
end
end

script.Parent.Touched:connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent)
if not HasTouched then
Freeze(hit.Parent, true)
HasTouched = true
return HasTouched
wait(4)
Freeze(hit.Parent, false)
HasTouched = false
else
return HasTouched
end
end
end)"



im pretty sure thats a script. crappy memory or just dumb
Report Abuse
FlameYeti is not online. FlameYeti
Joined: 14 Jan 2009
Total Posts: 22158
21 Sep 2015 08:23 PM
Um?

I gave you a function..
Not an entire script lul. ya, you did

If you can't comprehend Anchoring all the BaseParts in a Character that touches a Part then I don't know what to say, except that you should learn. i do, and that was pretty much the simplest part of the script

Learning loops is something you should look into. i can tho

I also did explain some methods I used. err no
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 08:30 PM
""if hit.Parent.Humanoid ~= nil then"

if game.Players:GetPlayerFromCharacter(hit.Parent) then

end

That checks if what hit it's parent is a Player, if so continue.

This is a better condition to check for than seeing if something has a Humanoid"

I told you how that works.

But to be honest, if you don't understand somethign lua 5.1 reference manual and programming in lua and wiki.roblox.com are your friend.
Report Abuse
booing is not online. booing
Joined: 04 May 2009
Total Posts: 6594
21 Sep 2015 08:33 PM
How do i get it to work in my freeze tag super arena game it keeps saying : hit is not a valid member
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Sep 2015 08:34 PM
pound cakes
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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