Others can't see movement from script

Finally works!!

Thank you so much :grin:

[Hold on, something just happened]

1 Like

Minor issue again :sob:

Might need a way to stop it when it gets to that point (or at 90 degrees)

Yeah, that looks brokey :sweat_smile:

Use math.clamp(x, min, max) to constrain the motion. If that doesn’t work try wrapping math.rad() around 0 and 90 as those are degree values.

local speed = 0.1
RS.Heartbeat:Connect(function()
	local x,y,z = FrontKnuckle.CFrame:ToOrientation()
	FrontKnuckle:PivotTo(CFrame.Angles(x, math.clamp(y - math.rad(speed), 0, 90), z) + FrontKnuckle:GetPivot().Position)
end)

Neither method worked, unless I did “wrapping math.rad() around 0 and 90” wrong:

local speed = 0.03
RS.Heartbeat:Connect(function()
	local x,y,z = Digit1.CFrame:ToOrientation()
	Digit1:PivotTo(CFrame.Angles(math.clamp(x - math.rad(speed, 0, 90), y, z)) + Digit1:GetPivot().Position)
end)

We’ll just leave 0 since 0 degrees = 0 radians, but encase 90 in a math.rad():

local speed = 0.1
RS.Heartbeat:Connect(function()
	local x,y,z = FrontKnuckle.CFrame:ToOrientation()
	FrontKnuckle:PivotTo(CFrame.Angles(x, math.clamp(y - math.rad(speed), 0, math.rad(90)), z) + FrontKnuckle:GetPivot().Position)
end)

Somehow still nothing.
All I changed was “FrontKnuckle” to Digit1 (I renamed the part label to that)

Did you rename all of the references inside of the LocalScript and Script?

Yep, I’m sure.

--// SERVER (SERVERSCRIPTSERVICE) //--
local REP = game:GetService("ReplicatedStorage")
local RS = game:GetService("RunService")

local remote = REP.FK1

local Digit1 = game.Workspace.RobotArm.Claw.DigitsKnuckles.Digit1
local Digits

local speed = 0.1
RS.Heartbeat:Connect(function()
	local x,y,z = Digit1.CFrame:ToOrientation()
	Digit1:PivotTo(CFrame.Angles(math.clamp(x - math.rad(speed), 0, math.rad(90)), y, z) + Digit1:GetPivot().Position)
end)

remote.OnServerEvent:Connect(function(plr, state)
	Digits = state
end)

I didn’t change a single thing in the client script too.

We keep bumping this topic, want to move this over to DevForum messenger?

1 Like

Sure, messaging