ByDefault
|
  |
| Joined: 25 Jul 2014 |
| Total Posts: 3197 |
|
|
| 19 Aug 2016 12:51 PM |
Is this possible using RemoteFunctions? I have a model stored in ServerStorage, and want to send it to the client through a RemoteFunction
--Server function bla.OnServerInvoke(player) player.bla:InvokeClient(model:Clone()) end
--Client local model
bla:InvokeServer()
fuction bla.OnClientInvoke(mod) print(mod) --> prints nil model = mod model.Parent = workspace end |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 19 Aug 2016 12:54 PM |
It says on the wiki that isn't: http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial#Limitations
Store it in ReplicatedStorage as that's the use of it. ServerStorage is for the server. |
|
|
| Report Abuse |
|
|
ByDefault
|
  |
| Joined: 25 Jul 2014 |
| Total Posts: 3197 |
|
|
| 19 Aug 2016 12:58 PM |
| But I only want the receiving player to have access to the model, and putting it in ReplicatedStorage would replicate it to all clients when I put the model in (?). |
|
|
| Report Abuse |
|
|
Real_Edgy
|
  |
| Joined: 23 Oct 2013 |
| Total Posts: 1212 |
|
|
| 19 Aug 2016 01:00 PM |
How would it prevent you from explicitly giving it to another player?
Are you not willing to write any backend whatsoever? |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:04 PM |
If you're afraid that some clients can clone the objects to workspace without permission, you can always use keys
ex:
function re.OnServerInvoke(player,request) if request = "sjfkb1b23jee" then game.ReplicatedStorage.Model:Clone().Parent = workspace end end
This siggy is copyrighted © |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:13 PM |
i do this for my weapon system
i invoke the server to make a projectile server side via cloning from server storage, then i return that value back to the client to make it invisible on their client
so i think your answer is, it should work
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 19 Aug 2016 01:14 PM |
or
you could use InsertService w/ remote functions. |
|
|
| Report Abuse |
|
|
Objectly
|
  |
| Joined: 18 Jul 2016 |
| Total Posts: 210 |
|
|
| 19 Aug 2016 01:14 PM |
| Let the server handle parenting the model. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:16 PM |
"Let the server handle parenting the model."
i forgot to mention this, you can parent it on the server then return the model to the client
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|