Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

FireServer() doing nothing ? specific title

I'm trying to replicate parts on my client to a server as a test to see if it's possible, it would make my job with scripting easier. The localscript in characterscripts:

print("Loading...")
script.Parent.DescendantAdded:Connect(function(p)
	print("Part! "..p.Name)
	p2=game:GetService("ReplicatedStorage").Create:FireServer(p.ClassName)
	p.Changed:Connect(function(prop)
		print("Making")
		game:GetService("ReplicatedStorage").Change:FireServer(p2,prop,p[prop])
		print("Made")
	end)
end)
script.Parent.DescendantRemoving:Connect(function(p)
		game:GetService("ReplicatedStorage").Removee:FireServer(p:GetFullName())
end)
print("Loaded!")

The script in ReplicatedStorage's Create (change, removee works fine):

script.Parent.OnServerEvent:Connect(function(p,thisthing)
	local h = Instance.new(thisthing)
	return h
end)

4 comments

2

You should use Remote function instead of event as event doesn't return anything (one way). Also you never set parent of the Instance you have created.

0

@karlo_tr10 didn't work.

0

did you use the correct formatting, remoteFunction.OnServerInvoke = function()...

0

yes @valk_3D

1 answer

ok sooo i had to put the scripts in serverscriptservice ok bye

This discussion is preserved as it was. New answers, comments, and votes are closed.