|
| 13 Oct 2010 04:28 PM |
dist = 15
while wait() do print("DIS IS IT!") for i,v in pairs(game.Players:GetPlayers()) do print(i,v) if (v.Character.Torso.Position - script.Parent.Torso.Position).magnitude <= dist then print("GRAB DA FOOL!") human = v.Character.Humanoid tongue = Instance.new("SelectionPartLasso") pull = Instance.new("BodyPosition") tongue.Parent = game.Workspace tongue.Humanoid = human tongue.Part = script.Parent.Parent.Parent.Character.Head tongue.Color = BrickColor.new(21) script.Parent.Remove:clone().Parent = tongue human.Sit = true wait(1) pull.Parent = human.Parent.Torso pull.position = script.Parent.Head.Position wait(2) pull:remove() wait(30) else print("Still not there!") end end end
~~~
I couldn't see the output since my place uses a lot of while true do loops for prints... AND btw, would this NOT grab ALL the players in the server, except for that only 1? |
|
|
| Report Abuse |
|
|
Kuroki
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 18058 |
|
|
| 13 Oct 2010 04:30 PM |
Why so many prints, tough? You should remove them |
|
|
| Report Abuse |
|
|
oysi93
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 12469 |
|
|
| 13 Oct 2010 04:31 PM |
Make two variables, one to check distance, and the other to store the player. Then iterate all players and check if their distance is lower than the distance you first made your first variable. If it is, set the variable to that distance, and set the player variable to that player.
Then do st00f on THAT player. =)
local MinDist, ClosestPlayer = 20 -- 20 will be maximum distance -- The rest you should be able to do yourself if you really made the script you posted -- |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2010 04:31 PM |
| In order to see if they work, duh. Because since a lot of my scripts are valuable (the only term i could use) it either doesn't run at all, or doesn't show any outputs. |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2010 04:32 PM |
@oysi
I editted this script from my Zombie Survival Smoker tool (my other famous place) |
|
|
| Report Abuse |
|
|
Kuroki
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 18058 |
|
|
| 13 Oct 2010 04:32 PM |
| If they work after youre done testing them, just remove the prints... OR just use pcall |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2010 04:33 PM |
| No i saw a red print in the output. Pretty sure its this one since it doesn't work. |
|
|
| Report Abuse |
|
|
Kuroki
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 18058 |
|
|
| 13 Oct 2010 04:36 PM |
Then if the only red print you see is this one, remove all the other prints...
|
|
|
| Report Abuse |
|
|
|
| 13 Oct 2010 04:37 PM |
| Wait ok i fixed it lawl missed some variables |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2010 04:39 PM |
Take the 0ld print statements 0ut, after they have served their purp0se 0f debugging.
Als0, u can expand, and scr0ll 0utput backwards. U will never be able t0 pr0gram, with0ut being able t0 check the 0utput.
|
|
|
| Report Abuse |
|
|
|
| 13 Oct 2010 04:42 PM |
| Ha, but why are you guys talking with this 0. Did i say something weird? |
|
|
| Report Abuse |
|
|
oysi93
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 12469 |
|
|
| 13 Oct 2010 04:47 PM |
"I editted this script from my Zombie Survival Smoker tool (my other famous place)"
That has nothing to do with anything, at least not my message. So try what I said, and you'll be happy, I promise. =) |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2010 04:48 PM |
"-- The rest you should be able to do yourself if you really made the script you posted --"
Yea i know what im doing... I know how to script too alright considering im not risking getting any viruses from free models |
|
|
| Report Abuse |
|
|