#I need to transfer data from local script to server script

1 messages · Page 1 of 1 (latest)

undone dagger
#

So basically I'm making a gun and I want the projectile to point to the player's mouse. The player's mouse position is gotten through a local script, but I need the mouse position to go to a server script so it would rotate to the player's mouse, and I've been stuck on this problem for multiple hours.

#

Another thing is that I'm pretty sure I can't just fire server with a remote event, because then if another player is firing a projectile it will go to the same point

silent pewter
#

it wouldnt

undone dagger
#

oh alr

#

idk how to properly transfer data with remote events, since they are pretty new to me

silent pewter
#

rn i cant really help cuz im doing something, but i recommend looking up a tutorial on it, as it helped me to learn it

#

its not too hard either

undone dagger
#

ok thanks

dry birch
#

try something along the lines of remotevent:fireserver(mouse.position)

#

in your local script

#

and then the server script

#

remoteevent.onserverevent:connect(function(player,mouse.position)

nocturne magnet
#

you could also just include the specific model gun in the data fired to the server