I need help on how to make the part look at the mouse i want it to just constantly face the mouse but this doesn’t work any help?
You’re not accessing the players mouse, You need to access it through player:GetMouse()
theres a local script that defines the mouse and sends it over via mouse.hit
Does it not rotatate, or something like that? I would also try to change up the while loop
while task.wait() do
MagicCircle.CFrame = CFrame.lookAt(MagicCircle.CFrame, Mouse)
end
EDIT: Or use a renderStepped function
okay i will try this out and see if it works
i got this error
and im just trying to get it to constantly rotate towards to the mouse
This is supposed to be MagicCircle.CFrame = CFrame.lookAt(MagicCircle.Position, Mouse)
like it was in the original post.
Could you describe or attach a picture of what happens when you run your current code?
when i activate the remote event it just creates the magic circle and it sits above the character but doesn’t constantly look at the mouse
Are you firing the RemoteEvent to the server repeatedly or just once?
If its just once then the part is probably just looking at the position you sent instead of updating with your current mouse position as well.
I think he’s using a while loop but using RunService could be better
If you’re referring to the code in the original post, that is from a server script. We haven’t seen the local script yet so I am just asking about that.
He shouldn’t need to fire it more than once, if he’s using a while loop that can use up a lot of memory. If you fire it more than once.
this is the local script
yeah the only thing wrong is that the script inside the while loop doesn’t work
This code just sends the mouse’s position once at the time of the tool being activated, so it won’t update the mouse’s position on the server past the event firing. You have to update the mouse’s position on the server for the part to follow the mouse.
Since you would need to use a while loop on the local script for that anyways you should probably get rid of the while loop on the server.
alright im going to try that and see if it works
wow thanks it actually works correctly yeah the mouse pos just wasn’t saving
only issue is the circle is not facing it correctly but it works so thats just somthing for me to figure out
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.