#hitbox created by my attack system dosent appear in the server (code included)

1 messages · Page 1 of 1 (latest)

long wing
#

i know it has something to do with it being in a local script but i cant use serverscripts because this type of thing needs to be in startercharacter scripts, which dosent work with serverscripts.

#

lemme screenshot the code hold on

#

but yea i made this and the hitbox created wont transfer to the client

#

server*

#

lemme send a vid

iron plover
#

Are you familiar with the server-client model?

long wing
#

not rly

#

can stuff from the client like

#

be parented to the server or something?

faint token
#

Use remote events

stark duneBOT
#

studio** You are now Level 11! **studio

tawny phoenix
long wing
#

so make a remoteevent that is triggered by a localscript, then the serverscript is triggered by the remote event?

#

also where should i put the remote event?

#

ok, i figured out how to make the localscript attack cause an effect on the server with a remoteevent

#

but

#

how can i make the remote event spawn the hitbox at the attacker's position if it cant figure out who the attacker is

#

cuz the value for who the attacker is
is in the localscript

iron plover
# long wing not rly

local scripts are on the client, and anything done on the client will only be shown for the player. While things done on the server are replicated to all other clients/players

#

For client sided hitboxes, you should send the information that the hitbox gets to the server and validate it from there

long wing
#

so if a localscript triggers a remote event, does the serverscript that senses the remoteevent getting trigger just know all the variables from the localcsript or something like that?

#

idk how else i would send that info

iron plover
long wing
#

uh

#

not rly

iron plover
long wing
#

ok

#

also while i watch those i will send u the code i have rn so u can understand it cuz maybe ive been explaining it weirdly

iron plover
long wing
iron plover
long wing
#

so there is a way to manually send data from a local script to a server script via remoteevents?

#

ok

#

im watching the video still to figure it out

#

oooh shoot

#

it will automatically define the player that triggered the event

#

and then i can use it to get the character

#

i understand it now

#

ok

#

i made the hitbox appear to the server now

#

and i will continute to watch those tutorials