#How do i script it to
1 messages · Page 1 of 1 (latest)
pick it up client side
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
????
what should be done server-sided?
they want the apple to stay where it is..?
proxprompts and click detectors should be clientside, at the very most you can clone the apple and hand it to the players backpack server-side but that's about it
What is 'it'
What is 'apple'
What do you mean by pick up? Touch --> you have a tool in your backpack, or a picking up animation?
localscript
he wants to do it so its only picked up for one person, so client side
he doesnt want it for everyone
exactly, but you shouldn't be giving a tool client side
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.
couldnt he just fire an event to give the tool server side anyway
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
it should be fine to do client side apart from the tools
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
it could still be done purely with a remote but your idea is valid
The reason I don't personally use remotes as much when I need to send info back to the server is how long they get
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
Very handy for keeping scripts readable imo
Let me login to studio to show you but yes, its main difference is how you use it on server
Same in how you invoke
ill look into them, seem useful against remotes
ah makes sense
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
thats what i said!
destroy the apple clientside
BUT
give the tool to the player serverside