Issues with showing arm on the server

(first post btw just finally got unsilenced up to member after 2 years and a few days of read time)

  1. What do you want to achieve? Keep it simple and clear!
    Well to be honest I don’t know how to make this simple or clear because it confused me for the past nearly 4 months
  2. What is the issue? Include screenshots / videos if possible!
    So after I dug around for stuff I concluded that the main issue isn’t the remote event but the way I am trying to display the arm, my attempt is in the example below (may be messed up or something cause there’s been so many edits to it)
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I get this could be obvious to some but I personally have tried way too many solutions and have spent 5+ hours multiple times in some days trying to fix this (and yes way too many attempts to search for solutions)

(if you need more of the code that I believe isn’t needed please ask)

game.ReplicatedStorage.Look.OnClientEvent:Connect(function(otherPlayer, ArmRotation)
	local Arm = otherPlayer.Character:FindFirstChild("RightUpperArm", true)
	if Arm then
		tweenService:Create(Arm, TweenInfo.new(.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, math.huge,false,0), {Arm == CFrame}):Play() print("passed doesn't work tho")
	end
end)

In short: Trying to find someone who knows how to fix the tweened arm to show on the server

1 Like

seriously though, I really spent 3 months waiting for this to give me member so I could post this one problem that I continue to try fix almost every single day… if a error is detected or a new way to show a smooth tweened arm in server then that would be awesome

also the rest of the script is basically a arm that follows the mouse

Rewrite this to where the tween is already defined
Example:

local tweenservice = game:GetService("TweenService")

local function createArmTween()
	local info = TweenInfo.new(.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, math.huge,false,0)
	local goal = {
		
		CFrame = --whatever CFrame you want or whatever you need goes here
		
	}
	return tweenservice:Create(Arm,info,goal)
end

local armTween = createArmTween()

game.ReplicatedStorage.Look.OnClientEvent:Connect(function(otherPlayer, ArmRotation)
	local Arm = otherPlayer.Character:FindFirstChild("RightUpperArm", true)
	if Arm then
		armTween:Play()
	end
end)

1 Like

well, it does and doesnt work, theres no errors from output or dev console client/server

though i think the tween does really work now because of the cframe being equal to Arm.CFrame

not sure whats going on here, the whole purpose of it is to send a request to server then run the code on the client event, i checked with some prints and it went through fine
the result of the entire process should be the arm that is following the mouse being shown on another players screen after being tweened on the server to its positions (positions that were created on the client side)

ohhhhhhh you want the arms to follow the mouse. For this do not use tween service for this, since tween service isn’t constant or can’t change consistently. Use Runservice, and through runservice constantly fire a remote event that contains the C1 info of both the left and right arm joints in the torso. Though in order to get the arms to face the mouse, Im not sure how to do that as I am not good with math on roblox unfortunately

It would look something like this

local character = script.Parent
local torso = character:WaitForChild("Torso")
local player = game.Players.LocalPlayer

game:GetService("RunService").RenderStepped:Connect(function()
    torso["Right Shoulder"].C1 = --Idk what goes here since I am not good with math but look up on google how to make the arm joints follow the mouse
torso["Left Shoulder"].C1 = --Idk what goes here since I am not good with math but look up on google how to make the arm joints follow the mouse
    EventYouHaveForFiringToServer:FireServer(torso["Right Shoulder"].C1,torso["Left Shoulder"].C1,player)
end)

Then on the server, just receive the event and equal each joint’s C1 on the server to the C1 coming from the event

1 Like

Theres a couple of problems in this for loop.
First, you are checking if the value is not a player when you are trying to loop through game.Players

if value ~= nil

Would be a good replacement for

Since using “~=” means not equal to.

The second problem is that you are firing for each client when looping instead of that specific client. If you want, instead of looping through all players you could just fire all clients by itself instead of looping, but Since you are checking distance as well, you should probably just switch from FireAllClients to FireClient

1 Like

thanks, just did the edits now the sole problem is how i switch the server C1 to clients sent C1
ill solve this after school

1 Like