arch_ocean
(Ohio_AmongUs)
July 20, 2021, 5:53am
#1
Local script:
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local root = char:WaitForChild("HumanoidRootPart")
remote:FireServer(root,CheckHumanoid2,CheckHumanoid2.Position,root.Position)
-- checkHumanoid is dummy 's root part
Server script:
remote.OnServerEvent:Connect(function(ply,root,target,targetPos,rootPos)
root.Position = targetPos
target.Position = rootPos
end)
but only client that change position the server won’t change.
client pic:
server pic:
Thank for helping!
Try CFraming the HumanoidRootParts of the dummy and your character in the server and see if that fixes it.
1 Like
arch_ocean
(Ohio_AmongUs)
July 20, 2021, 6:00am
#3
what data should I send to server
arch_ocean
(Ohio_AmongUs)
July 20, 2021, 6:03am
#4
Oh nevermind I got it just change position to cframe
All you need to send is your character and the target to the server. Then you’ll do
remote.OnServerEvent:Connect(function(player,target)
local TargetCFrame = target.HumanoidRootPart.CFrame
target.HumanoidRootPart.CFrame = player.HumanoidRootPart.CFrame
player.HumanoidRootPart.CFrame = TargetCFrame
end)