LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 03:15 AM |
So for some reason, when I unset the shoulder joint of a player then directly move their arm via CFrame, it's completely fine for about a minute, then it gets deleted.
What's up with this? I can't find anything about it yet it happens without fail. Is there a way to directly move a player's arm to world co-ords without the game deciding that it actually wants to delete it? |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 13 Jan 2017 03:20 AM |
| If you move the player's arm using CFrame, the joint will break and the arm will fall trough the world since it's uncancollided and then get's deleted by the debris. |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 03:27 AM |
Well no, because I'm moving it with a CFrame, so it's not falling, it's floating in the air since I'm moving it every frame.
I should add that I can see the arm floating there before it's deleted, it's not falling at all. |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
| |
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 03:31 AM |
| Nope, arm just gets deleted and that's it. |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
| |
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 03:36 AM |
A bit messy, but hopefully readable.
local player = game:GetService("Players").LocalPlayer game:GetService("RunService").RenderStepped:connect(function() --A point directly infront of the camera, offset by 5 local firePoint = workspace.CurrentCamera.CFrame:toWorldSpace(CFrame.new(0,0,-5)) --If the player has a character, then move their arm if player.Character then player.Character:WaitForChild("Torso"):WaitForChild("Right Shoulder").Part1 = nil player.Character["Right Arm"].CFrame = firePoint end end) |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 13 Jan 2017 03:50 AM |
Not messy at all :D
I think this is the a core script thinking the right arm is detached and just useless data now so it deletes it.
Maybe using a weld to position the arm should fix that, but I am not sure. |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 03:52 AM |
I tried that too and same result. It's driving me a bit mad since the game is just dictating what should happen. I've even tried changing the RightGrip so it welds the tool to a floating part instead, but it still deletes the arm and tool.
I'm really lost on what to do at this point, it feels like nothing in Roblox can just be simple. |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 13 Jan 2017 03:58 AM |
| Maybe try to clone the torso and the right arm and the head of the character and then insert them into a model with a humanoid and set the torso's and head's transparency to 1 and the original right arm's transparency to 1 and then position the cloned right arm in front of the camera |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 04:05 AM |
| I'll probably have to make a fake everything just so the game doesn't throw a hissy fit, which means creating an exact copy of my gun and manually positioning it I suppose. |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 08:08 PM |
I think I've found the issue. Because it's tied to the framerate, if the game lags really bad and no frame is drawn for a good second or so, the part won't have its CFrame updated anymore and will fall until it eventually gets deleted. Obviously because no frames are being drawn in this time, it doesn't look like it's falling at all, one frame it's there, the next it's gone.
To fix this, I can make the part anchored so that it doesn't fall, even when there's lag. |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2017 08:14 PM |
| create a weld between the arm and the torso and edit the cframe of that, or just edit the existing joint, and this way you don't need to update position every frame and it will never fall. |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 08:18 PM |
I found the joint/attachment system to be really outdated and hard to use. The other issue is that the player's arm's front face points upwards when you're holding a tool, so in order to add what I intended to add I'd need to add offsets and rotations to fix it.
I did look into using a weld though, there's just a lot to keep track of. |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
| |
|
|
| 13 Jan 2017 08:24 PM |
| You can use temp. welds to hold it in place and move those, then reset the original joint... |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 08:24 PM |
| Thank you, I'm actually doing a complete rewrite of it to prevent hacking and fix a few deep-rooted bugs. You should follow me if you want to see when the newest version comes out. |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 08:26 PM |
| The main reason I'm not using welds is due to how difficult it is to put something directly in the centre of the screen. My old place used welds and it made things a bit off, which I'm trying to prevent. |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2017 08:44 PM |
http://wiki.roblox.com/index.php?title=CFrame#Methods
you can use :ToWorldSpace and :ToObjectSpace to help you put something directly in the center of the screen with welds |
|
|
| Report Abuse |
|
|
LiruJ
|
  |
| Joined: 05 Jul 2016 |
| Total Posts: 29 |
|
|
| 13 Jan 2017 08:50 PM |
| I used those methods, although for a different purpose. I've already rewritten most of my code to use decorative models for everything as I need decorative models anyway, so I believe it's all fixed now. |
|
|
| Report Abuse |
|
|