Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
|
| 18 Nov 2015 11:46 PM |
Hi! I am trying to make a region around a player that detects a certain part.
To do so, I am trying to use a non-CanCollide Ball larger than the player and welding it to the player's Torso. However, the player's movement glitches out, making turning very slow. Are there any ideas how to fix this or workaround this issue?
No, Region3 would not work as I have to take the parts' rotation and the player's rotation into context too.
Thanks for reading! |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 19 Nov 2015 12:18 AM |
Wait, are you asking how to weld a part or you have already done it, but it is glitching the movement?
~davisky~ |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 19 Nov 2015 12:21 AM |
Instead of welding it, just use a loop and set the CFrame constantly. Or wait till those new property things come out and IIRC you can change the mass. |
|
|
| Report Abuse |
|
|
Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
|
| 19 Nov 2015 12:35 AM |
@davisky: I have already welded it @cntkilme: Wouldn't that lag the game? What is the limit of such loops until lag becomes a real issue? |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 19 Nov 2015 12:37 AM |
| Yeah wait till the update then set the density really low. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 19 Nov 2015 12:40 AM |
Why would it lag the game? And it's not about the 'limits of such loops', it's about the 'sanity of the scripter'. You can use as many loops as you need, and if done correctly won't be a problem. But then someone else can use a single loop and just, well, do too much in it.
Anyways this is what I meant:
local charTorso = blah; local ball = blah; game:GetService("RunService"):BindToRenderStep("BallMovement", Enum.RenderPriority.Character, function() ball.CFrame = charTorso.CFrame; end); |
|
|
| Report Abuse |
|
|
Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
|
| 19 Nov 2015 12:44 AM |
| @cntkillme: Is it the same if I use a while true do...wait() end loop? |
|
|
| Report Abuse |
|
|