#How to make character facing to mouse
1 messages · Page 1 of 1 (latest)
player character's network owner is the player
meaning if you move your character on your client then it gets replicated to the server
and not the other way round
so you mean if i move char in client its gonna be replicated to server?
yup
can you tell me then why this works only for me
game.ReplicatedStorage.OneButton.OnClientEvent:Connect(function(bool)
local cycle
if bool then
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local char = plr.Character or plr.CharacterAdded:Wait()
local hrt: Part = char:WaitForChild("HumanoidRootPart")
cycle = game["Run Service"].RenderStepped:Connect(function()
local hitpos = mouse.Hit.Position
hrt.CFrame = CFrame.new(hrt.Position, hitpos)
end)
end
if not bool then
cycle:Disconnect()
end
end)
maybe this wont work cus im doing local server test?
it should work
what does the other player see?
just standing
without even spinning
i just tested this in global server with my friend and this still doesnt work