#Transfering stuff from local to server

1 messages · Page 1 of 1 (latest)

subtle inlet
#

Making a singleplayer cube pushing/combination game.

Problem: when i try to combine cubes, server looks for them, but doesn't find them. How do I add them to the server, even if temporarily? ( I won't migrate the code from my local to a server script )

Check scripts bellow

subtle inlet
#

can it transfer physical objects too?

novel basin
#

Pretty sure it cannot transfer objects made in a localscript into the server

subtle inlet
#

how do i proceed then?

novel basin
#

Since it can only be accessed through LocalScripts, Not sure how the server would see it or even reference it

novel basin
#

But Servers cannot see client-made objects sadly enough.

subtle inlet
#

can i somehow make server spawn for client?

#

and also destroyfor client

novel basin
#

I mean i think you can tell the client to spawn an object and put the Data when spawned inside a table which has a randomized key to avoid exploitation (in my opinion)

#

In which then you could just tell the Client to Remove For example:

Server: Hey, i want to remove Cube1_0 from the play area

Client: ok lol

Server: And also Cube1_1

Cleint: ok lol

#

But thats just how i see it could work

#

i wouldnt take my own advice

#

lmao

#

Although possible, You should remember that even for a singleplayer you might still wanna add in protection

#

as exploiters can just spawn Rare objects

#

🤫

subtle inlet
#

yeah that is why am even using remote event

novel basin
#

RemoteEvents are kindof unreliable in terms of Client -> Server

#

Cause it could go like this

Real client: Hey i just combined This Cube and That Cube do i have permission?

Server: ok lol

Exploiter: Hey i just combined This Rare Cube and That Rare Cube do i have permission?

Server: ok lol

#

Cause theres no protection on whether its real or not its unrealible

subtle inlet
#

ofc server has checks

novel basin
#

and considering you spawn it in a local script is EVEN more unreliable

#

In my opinion

Make the server tell the client to spawn a randomized object and store that object inside a Server Table with a key, so when the client tells the server, its actually valid.

#

I think i didnt word that right

#

🤷

subtle inlet
#

i will figure smth out