10/3/2023 0 Comments Roblox local player![]() so to fix this all you need to do is update the motor’s transform on the other clients instead of the server the flashlight on the client who is holding it will appear as its jittering. you first want to make sure the person who is firing it is the player holding the flashlight then update the motor’s c0Įvent:FireServer(RightShoulder, RightShoulder.Transform) event.OnServerEvent:Connect(function(player, motor, transform) If tick() - lastSendTick > 1 / updatesPerSecond thenįor the remote on the server side. This goes into the localscript of the tool local lastSendTick = tick() If you do it every frame performance will drop so change it update 5 times per second, higher or lower depending how smooth you want it You need to replicate it yourself by firing a remote to the server RightShoulder.Transform = rotationOffset * CFrame.new(Vector3.new(0, 0, 0), direction) * CFrame.Angles(math.pi / 2.5, 0, 0) since CFrames are relative, put the rotationOffset first, and then multiple by the point CFrame, and then multiple by the CFrame.Angles so the arm points in the right direction Local rotationOffset = (rootCFrame - rootCFrame.p):inverse() Local rootCFrame = HumanoidRootPart.CFrame get the rotation offset (so the arm points correctly depending on your rotation) update direction to camera's look vector Handler = RunService.Stepped:Connect(function() :Connect(function()ĪnimScript = Tool.Parent:WaitForChild("Animate")ĪnimScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim")Ī = "" ![]() Local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") Local RightShoulder = RightUpperArm:WaitForChild("RightShoulder") Local RightUpperArm = Character:WaitForChild("RightUpperArm") Local Character = Player.Character or Player.CharacterAdded:Wait() ![]() Local RunService = game:GetService("RunService") Local Players = game:GetService("Players")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |