(Do you tried to unanchor the clock while using welds? If the clock is anchored, the player can‘t move)
That’s not the problem, look at the video I put, the hands are behind the character when you move.
Welds don’t work because the hands can’t move when you weld it.
how about using a RodConstraint? Put the Rod in the hand and the middle part where the hands rotate.
Hands still can move. Its you that are falsely welding. How do you weld? (I needed to weld a armband to the hand of a character and it worked, I know what i am saying about. Remember to set CanCollide to false)
I’m welding the hands to the clock frame (when I do it)… How else am I supposed to weld it? Legit it can’t move when it is welded (because the clock is welded to the character through an accessory).
No, you need to weld the clock to the hand, not the hand to the clock
A Character always has some attachements. Maybe you could weld the clock to the attachements.
Yea but the thing is, the clock frame is welded to the player, so if the hands are welded to the frame, when it moves, it will move the frame too, which will in result turn the character as well…
RodConstraints might work, “While the attachments remain at a set distance from one another, they can both rotate freely.” sounds about right, I’ll try it.
I am now lost. If the clock is welded to the player, what is the problem?
(Are you using WeldConstraints instead of Welds?)
Did you look at the video? The video shows the hands being behind the player (they are trying to catch up to the player).
Ok, i now see;
Dont use bodyposition for this. You should update the position using math, not using body position.
I would:
Weld both Clock Components to the Clock Background
And just rotate it
But if you use BodyPosition it is normal that it has a delay. If your whole script is relaying to the while loop (if you are updating the Clock Components using the While loop) then you would need an extremly fast while loop so that it welds correctly. But you cant, your only hope is to using welds. Welds will automaticly update the position without an to expensive code (while loop), so its what you need.
As i dont now your full code, I will try to do my best:
local HourHand, MinuteHand = YourHourHandPart, YourMinuteHandPart
local ClockBackground = YourClockBackground
--As soon the power starts, weld both hands to the clock background, and weld the clock background to the torso:
PowerStartsEvent:Connect(function(Player) --PowerStartsEvents is your RemoteEvent
local ClockToTorso = Instance.new("WeldConstraint") do
ClockToTorso.Part0 = Player.Character.HumanoidRootPart
ClockToTorso.Part1 = ClockBackground
ClockToTorso.Parent = Player.Character.HumanoidRootPart
end
local HourAndMinuteHand = Instance.new("WeldConstraint") do
HourAndMinuteHand.Part0 = HourHand
HourAndMinuteHand.Part1 = MinuteHand
HourAndMinuteHand.Parent = Player.Character.HumanoidRootPart
end
function Update()
local hours, minutes = string.match(game.Lighting.TimeOfDay, “^(%d%d):(%d%d)”)
local hourHandCFRAME = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi/2, 0, 0) *
CFrame.Angles(0, 0, math.rad((hours * 30)+ (minutes * 0.5))) * CFrame.new(0, 0.2, 0)
local hourHandVECTOR = hourHandCFRAME.p
local minuteHandCFRAME = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi/2, 0, 0) *
CFrame.Angles(0, 0, math.rad(minutes * 6)) * CFrame.new(0, 0.3, 0)
local minuteHandVECTOR = minuteHandCFRAME.p
---
script.Parent.HourHand.BodyPosition.Position = hourHandVECTOR + Vector3.new(0,.2,0)
script.Parent.MinuteHand.BodyPosition.Position = minuteHandVECTOR + Vector3.new(0,.2,0)
---
local hourHandORIENTATION = hourHandCFRAME:ToOrientation()
local minuteHandORIENTATION = minuteHandCFRAME:ToOrientation()
---
script.Parent.HourHand.BodyGyro.MaxTorque = Vector3.new(hourHandORIENTATION)
script.Parent.MinuteHand.BodyGyro.MaxTorque = Vector3.new(minuteHandORIENTATION)
---
local hours, minutes = string.match(game.Lighting.TimeOfDay, “^(%d%d):(%d%d)”)
---
HourHand.Position = (script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi/2, 0, 0) * CFrame.Angles(0, 0, math.rad((hours * 30)+ (minutes * 0.5))) * CFrame.new(0, 0.2, 0)).Position
MinuteHand.Position = (script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi/2, 0, 0) * CFrame.Angles(0, 0, math.rad(minutes * 6)) * CFrame.new(0, 0.3, 0)).Position
end
while true do
wait()
Update()
end
end
RodConstraints aren’t doing me any good.
I can’t do welds… They don’t work… I’ve tried it in many ways and it just makes my character go crazy from the moving script (yes they are unanchored and cancollide is off).
I do agree with not using body movers though.
Check out my Code. I tried using Welds, you just have to try and try. I know Welds are maybe crazy, but here you need welds. Without welds your project need to rely on a really heavy while loop, and you dont want this. So, keep trying (but this time use welds without body position).
If you use Welds, you need to update the position, not the CFrame: If you update the CFrame your Code will broke, because Welds are applied the wrong way.
Edit: I modified the script I wrote. Remember: I dont have the full script, so i cant really help. I am trying my best.
Maybe try setting massless to true if it isn’t set to true.
Also, try using
game:GetService("RunService").Stepped:Wait()
I use this myself.
And put it in a loop.
Now, if massless is set to false, try welding again.
Thank you for reading.
Have a nice day.
You are updating Part position, yeah ok that he could just use the Stepped event, but it wouldnt be the best perfomant way. Remember that this could be really heavy if you are on mobile. So, if you try welds 1000 times and still dont work, you could use it yes, but remember that this isnt really a perfomance friend
I just got an idea that will work better than welds and body movers I think. If I make the hands both separate accessories, then use attachments to attach them, then I can rotate the attachment to move the hands instead.