It is used for moving a move that has a few seconds of start up, therefore the target may have already moved out of the way. So, I’d like to have a constant firing of the mouse.Hit for the location of the move to go to so you can re-aim it if they move.
If that makes sense
yea do that on the client side, because doing that on the server is actually weird
(if you are creating a Target system where others players CAN see that you are
marking him, then this is another topic)
and yes, do that on the client side
because, think about it:
if 50 players are targeting someone at the same time ( the server will explode )
Its not like a target target its like just where your mouse is so the server can see it.
Also I dont get how you’d go about putting it on the client when the event has already fired and sent to the server, done the move cutscene and now I want the mouse position to aim the move to
while true do
task.wait(0.1)
game.ReplicatedStorage.UpdateLFireServer(mouse.Hit)
end
script.Parent.OnServerEvent:Connect(function(player, mHit)
player.Character.Stats.Target.Value = mHit
end)
This could work. The problem is that the amounts of requests the single RemoteEvent is intaking is causing an outage of service provided by it. You could also use the changed event, like this:
I have taken your advice on using something other than a while loop. Despite your method of mouse:GetPropertyChangedSignal(“Hit”) not working (surprisingly i have no idea why that failed) .A quick google search found this :
UIS.InputChanged:Connect(function(input, engine_processed)
if engine_processed then
return
end
if input.UserInputType == Enum.UserInputType.MouseMovement then
print(“mm”)
game.ReplicatedStorage.Update:FireServer(mouse.Hit)
end
end)
which does… basically the same thing as yours but with more code
The issue is now rapid mouse movement breaks it as it acts like a while loop. My idea is to 1/2 or 1/4 the mouse movement in total (eg every other movement counts) to try reduce strain on the event. Thanks for the help