#How to make char facing to mouse

1 messages · Page 1 of 1 (latest)

fiery hare
#

How do i make (for skill) character facing to mouse some amount of time and that can see even from server

jade heart
#

what?

thick wing
fiery hare
#

and server cant see it

thick wing
#

then get the end position that you want the character to be at and send it using a remote event to the server to be changed from there

sudden linden
fiery hare
# sudden linden have you... maybe, perhaps, actually tried it, maybe?
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)
#

here is script

#

actually i tried

#

it doesnt work

#

in global

#

or local server play test

sudden linden
#

at least you didn't use ai for that

fiery hare
#

only player can see it

sudden linden
#

points for effort?

fiery hare
#

xd

thick wing
fiery hare
#

not one end point sending

thick wing
#

so you want to use heartbeat?

fiery hare
#

also tried AlignOrientation but im anchoring char so it doesnt work

fiery hare
#

but if its only the way

thick wing
#

if you want it server sided you gotta fire to the server. Unless you make the server control the "ability"

sudden linden
#

just tested it and it works fine

fiery hare
sudden linden
#

yes, working as expected

#

you dont need to send it to server, the client already has network ownership of their character, so changing the cframe on the client will send it to the server automatically

fiery hare
#

...

thick wing
#

i think that's the problem. he might not be using the player's character

sudden linden
#

or you did something else dum

fiery hare
#

oh

#

nah

#

anchored thing doesnt allow to move character

#

like client see

#

but server cant cus of anchor

#

anyway

#

thx

sudden linden
#

anchoring will give network ownership to the server

fiery hare
#

toyall