#How do i script it to

1 messages · Page 1 of 1 (latest)

sick totem
#

how do i script it to pick up a apple but the apple stays there for other people

celest moat
#

pick it up client side

vital saddle
#

use a click detector or proximity prompt on the apple on the ground. Then give them a tool that’s just an apple. Should be done server side imo

fast ether
#

what should be done server-sided?

static pecan
queen wagon
celest moat
#

he doesnt want it for everyone

vital saddle
#

The apples on the ground have to stay there for everyone, if he'd like to remove the apple on the ground for only the player who picked it up, yes handle that on the client as well.

celest moat
vital saddle
#

Yeah it is as simple as that but I'm thinking protection so the player can't pick up an apple they've already picked up, if you don't care for that it could be almost entirely client sided

celest moat
#

it should be fine to do client side apart from the tools

vital saddle
#

Yeah, I'd use an RF personally so it is easier to communicate back and fourth. Like if you wanted to add an UI that said you picked up an item.. use an RF instead

#

If you literally only want an apple to be picked up and deleted client side just use RE

celest moat
vital saddle
#

Unless they only have one use you need an "Event" paramater as well as how ever other many parameters, with a RF you just do ;

local IsValid = RF:InvokeServer("IsValid")
image.Visible = IsValid
#

Well you still need a event parameter nvm lol

celest moat
#

Ah makes sense

#

never used RC

#

RF

#

so RF:InvokeClient

#

etc?

vital saddle
#

Very handy for keeping scripts readable imo

vital saddle
#

Same in how you invoke

celest moat
celest moat
vital saddle
#

Also if you invoke client it also sends info to server but isn't required. For me I have more use in using a RF on this system than an RE and I didn't want two (You should note not to be using InvokeClient unless you are only sending them to "trusted" users, otherwise exploiters will probably mess w it)

#

Didn't have it set up on my current script system so I had to find an old example, this is what it looks like to setup an RF on server side

static pecan
#

destroy the apple clientside

#

BUT

#

give the tool to the player serverside