hey chatgpt, this is roblox lua coding, can you replicate the thing happening on the…
- User
hey chatgpt, this is roblox lua coding, can you replicate the thing happening on the client event to the server script for me please thank you. no yapping:
client: task.wait(3) --R6 Only local RunService = game:GetService("RunService")
local player = game:GetService("Players") local localplayer = player.LocalPlayer local mouse = localplayer:GetMouse() local camera = workspace.CurrentCamera local character = script.Parent local remotevent = script.Parent:FindFirstChild("Script").RemoteEvent
local gun = localplayer.Character:FindFirstChildWhichIsA("Tool")
local torso = character:WaitForChild("Torso") local head = character:WaitForChild("Head")
local rightShoulder = torso:WaitForChild("Right Shoulder") local leftShoulder = torso:WaitForChild("Left Shoulder") local neck = torso:WaitForChild("Neck")
local rightShoulderCopy = Instance.new("Motor6D") rightShoulderCopy.C0 = CFrame.new(1.5, -1, 0) * rightShoulder.C0.Rotation rightShoulderCopy.C1 = CFrame.new(0, 0.5, 0) * rightShoulder.C1.Rotation rightShoulderCopy.Part1 = rightShoulder.Part1 rightShoulderCopy.Name = "RightShoulderCopy" rightShoulderCopy.Archivable = false rightShoulderCopy.Part0 = head rightShoulderCopy.Parent = head
local leftShoulderCopy = Instance.new("Motor6D") leftShoulderCopy.C0 = CFrame.new(-1.5, -1, 0) * leftShoulder.C0.Rotation leftShoulderCopy.C1 = CFrame.new(0, 0.5, 0) * leftShoulder.C1.Rotation leftShoulderCopy.Part1 = leftShoulder.Part1 leftShoulderCopy.Name = "LeftShoulderCopy" leftShoulderCopy.Archivable = false leftShoulderCopy.Part0 = head leftShoulderCopy.Parent = head
rightShoulder.Enabled = false leftShoulder.Enabled = false
RunService.Stepped:Connect(function() neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((mouse.Hit.Position - camera.CFrame.Position).Unit.Y), 0, 0) neck.C1 = CFrame.new() rightShoulderCopy.Transform = rightShoulder.Transform leftShoulderCopy.Transform = leftShoulder.Transform end)
server: i have no idea how to do it
- Assistant