local RemoteFunction = game.ReplicatedStorage.RemoteFunction RemoteFunction.OnServerInvoke = function(Player) return game.ServerStorage.Part:Clone() end
there are no errors but
What If I wanted to turn the part red or do things with it
when I do
RemoteFunction:InvokeServer().Parent = workspace in a local script it wont work
saying its a nil value when i returned something
how would I return a part through remote function
The part is still in serverstorage when you cloned it, and the client can't access serverstorage, so you might want to parent the part to workspace or something before returning it back to the client
local RemoteFunction = game.ReplicatedStorage.RemoteFunction RemoteFunction.OnServerInvoke = function(Player) local part = game.ServerStorage.Part:Clone() part.Parent = workspace return part end