In need of help with remotefunctions!

I keep getting these two errors I honesty don’t know what it means, I re-wrote the script two times already…

image

My Server Script - Creates a Part with a inside particle after a few seconds it removes it.

local function makeParticle(cf)
	local part = Instance.new("Part")

	part.Size = Vector3.new(4, 4, 4)
	part.Anchored = true
	part.CanCollide = false
	part.Transparency = 1
	part.CFrame = cf
	part.Parent = game.Workspace.CurrentCamera

	local clone = particle:Clone()
	clone.Enabled = true
	clone.Parent = part

	local life = clone.Lifetime
	for i = 0, 1.1, 0.1 do
		clone.Lifetime = NumberRange.new((1-i)*life.Min, (1-i)*life.Max + 0.1)
		wait(.3*0.1)
	end
	game:GetService("Debris"):AddItem(part, .3)
	return part
end

createParticle.OnServerInvoke = makeParticle

My Client Script - Invokes the server and gets the players cframe and multiplies with some numbers.

local part = createParticle:InvokeServer(hrp.CFrame * CFrame.new(0, -1, 0))

Anyone please help me, I greatly appreciate it!

1 Like

Before I look at the entire thing,
I noticed you didn’t provide the first argument as the Player, which is essential here.[on the server side]

Instead of this -
local function makeParticle(cf)
do:
local function makeParticle(player,cf)

now, let me see if there are more things here…

3 Likes

I realized I used a remotefunction instead of a remoteevent I feel so dumb and providing the player as the first arg helped too thank you so much!

3 Likes