Sending instance to client via Remote results in "null"

I’m currently trying to replicate some tweens to all clients using a remote. With the instance (an union) i’m trying to tween, I’m also passing the values to apply to the tween.
Module script (server side):

local function AoE(Shard,caster)
	local AoE_Hitbox = Shard:WaitForChild("AoE")
	local dictionary = {}

--Remote part causing me problems
Data.Replicator:FireAllClients("cryogen",AoE_Hitbox,Data.Speed,Data.Frequency,Data.Range)

--Ignore this part
	AoE_Hitbox.Touched:Connect(function(hit)
		local player = game.Players:GetPlayerFromCharacter(hit.Parent)
			if player and dictionary[player.Name] == nil and player.Name ~= caster.Name then --nil or false
				dictionary[player.Name] = true
				hit.Parent:FindFirstChild("Humanoid"):TakeDamage(Data.Damage)
				wait(Data.Speed)
				dictionary[player.Name] = nil
			end
		end)
end

Local script placed inside StarterGui (would it work also placed in StarterPack?)

local Services = require(game:GetService("ReplicatedStorage"):FindFirstChild("Services"))
local Replicator = Services.RS:WaitForChild("Replicator")
local Player = Services.Players.LocalPlayer

Replicator.OnClientEvent:Connect(function(skill,AoE,Speed,Frequency,Range)
	if skill == "cryogen" then
		local Goal = {Size = Range, Transparency = 1}
		local Info = TweenInfo.new(Speed,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,-1,false,Frequency)
		
		local Tween = Services.TS:Create(AoE,Info,Goal)
		Tween:Play()
	end
end)

Whenever i trigger the remote, it gives me this error:
image

Here is the full server script, if it can help. I didn’t include it fully because it’s a bit lenghty and seemed useless because I don’t think it’s the cause of my problem but I might be wrong.
Pastebin link

1 Like

It can only be infered that the “AoE” instance is a non-replicated instance; meaning it doesn’t exist on the client, just on the server, because the parent of it is nil. It can’t be sent over the remote if it’s a non-replicated instance, so you can just parent it to the workspace or whatever

1 Like

The thing is, the instance is copied from the serverstorage and then parented to the workspace by the server side, meaning the client is aware that it exists. Also, if i switch to client-view while test-playing I can see the instance in the workspace. That’s why I’m so confused…

Parent the cloned instance first before firing the remote

1 Like

Feeling so dumb right now.
Thank you so much.