I have created a remotefunction that when fired to the server it creates to parts and returns them back to the client, only problem is the client seems to not get them. Why?
client
local LHand,RHand = Rstorage:FindFirstChild('Events'):FindFirstChild('GenerateHands'):InvokeServer()
Server
-- services
local players = game:GetService('Players')
local runService = game:GetService('RunService')
local UserInputService = game:GetService('UserInputService')
local Rstorage = game:GetService('ReplicatedStorage')
-- events
local events = Rstorage:FindFirstChild('Events')
local generateHands = events:FindFirstChild('GenerateHands')
-- modules
local modules = Rstorage:FindFirstChild('Modules')
local setups = require(modules:WaitForChild('Setups',5))
generateHands.OnServerInvoke = setups.SetupHands
the module
local module = {}
module['SetupHands'] = function(player:Player)
local LHand = Instance.new("Part")
LHand.Size = Vector3.new(0.5,0.5,0.5)
LHand.Parent = player.Character
LHand.CanCollide = false
local RHand = Instance.new("Part")
RHand.Size = Vector3.new(0.5,0.5,0.5)
RHand.Parent = player.Character
RHand.CanCollide = false
RHand:SetNetworkOwner(player)
LHand:SetNetworkOwner(player)
warn(LHand,RHand)
return LHand,RHand
end
return module
it probably has something with the whole module thing but I dont know so here we are asking!
Thanks!