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 » Scripters
Home Search
 

Re: Is there anything faster than wait()

Previous Thread :: Next Thread 
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:02 PM
Bc i am doing a loop but it has a ton of stuff in it so i feel like shortening the wait can make it more smooth...
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
04 Jan 2015 09:05 PM
ur doing it wrong
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:06 PM
local Eyes = game.Workspace:FindFirstChild("Eyes"):GetChildren()

function findTorso(pos)
local torso = nil
local dist = 75
local child = workspace:children()
for i=1, #child do
if child[i].className == "Model" then
local h = child[i]:findFirstChild("Humanoid")
if h ~= nil then
local check = child[i]:findFirstChild("Torso")
if check ~= nil then
if (check.Position - pos).magnitude < dist then
torso = check
dist = (check.Position - pos).magnitude
end
end
end
end
end
return torso
end


while true do
for i = 1,#Eyes do
wait()
local torso = findTorso(Eyes[i].Position)
if torso ~= nil then
Eyes[i].CFrame = CFrame.new(Eyes[i].Position, torso.Position)
end
end
end

Lol what.
I have a model in workspace witch is like 10 eyes so.
Bang
It works but it's pretty like slow. As in the eyes are moving laggy-like even though the server has 0 lag
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
04 Jan 2015 09:08 PM
yep ur doing it wrong
u need to weld them
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:10 PM
>tells me I am doing it wrong
>doesn't tell me how to fix it
Report Abuse
earthyreuben is not online. earthyreuben
Joined: 17 Jan 2010
Total Posts: 669
04 Jan 2015 09:10 PM
Would you mind stating what exactly you are trying to accomplish.
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
04 Jan 2015 09:11 PM
welcome to scripters 2015
always not at your service
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:13 PM
I am trying to get a model (full of parts that have eye meshes) to simpley look at the player when they are within a certain range(or not it really doens't matter about the range but to reduce lag)

Ye
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:17 PM
Oh and it's a singleplayer game so I don't actually need it to make it find the nearest torso.
Instead i can just make it follow the single players torso which will speed it up a bit?
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
04 Jan 2015 09:18 PM
IN LOCAL SCRIPTS

render =game:service'RunService'.RenderStepped;
render:wait();





IN SERVER SCRIPTS

heart =game:service'RunService'.Heartbeat;
heart:wait();
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:19 PM
Does that just capture when the player walsk ro something
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
04 Jan 2015 09:21 PM
KOTWarrior has some of the least beautiful code ive ever seen ever

Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
04 Jan 2015 09:21 PM
No, I was providing a faster wait.
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:21 PM
ooohhhhh thanks m8
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
04 Jan 2015 09:21 PM
but your code is UGLY!

not this in particular...
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
04 Jan 2015 09:22 PM
@chief; and why is that?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
04 Jan 2015 09:22 PM
you're one of those guys who tries to compact Their Code as Much as Possible its UGLY!!!!!
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:24 PM
@Chief Shhh
Don't judge his way of scripting.
It's an art.
He can say your code to many character is ugly
Gg

Lol It's still really slow.
Is there like a better way of doing what i am trying or
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
04 Jan 2015 09:24 PM
even my USERNAMES are prettier than his...


KOTwarrior versus something SUPER COOL like Vulnerite or ChiefDelta or Procellus...
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
04 Jan 2015 09:25 PM
u know vuln/proc are the same people right?
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
04 Jan 2015 09:26 PM
dear god, are u keith?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
04 Jan 2015 09:26 PM
u know i am vuln/proc right
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
04 Jan 2015 09:27 PM
HELP ME
Take this fight to a different thread >.<
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Jan 2015 09:27 PM
Heartbeat is 30fps like wait() D:
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
04 Jan 2015 09:29 PM
>says ur doing it wrong
>tells u how to fix it

good guy bothangles :)
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