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
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 22158 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 21 Sep 2015 07:10 PM |
| If you want to freeze them all you have to do is anchor their torso |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
| |
|