Here's the local script:

script.Parent.MouseButton1Click:Connect(function()
	
	
	workspace.Events.h1:FireServer()
	
	
end)

Here's the server script:

wait()
script.Parent.OnServerEvent:Connect(function(player)
	
	player.Character.Head.h:Destroy()
	
		wait()
	
	local h1 = game.ReplicatedStorage.Hairs.h1:Clone()
	h1.Name = "h"
	h1.Parent = player.Character.Head
	
	local weld = Instance.new("Weld")
	weld.Parent = h1
	weld.Part0 = player.Character.Head
	weld.Part1 = h1
	weld.C0 = CFrame.new(0,0,0)
	weld.C1 = CFrame.new(0,-0.5,0)

	
	
end)

4 comments

0

How does it not work? Does it throw an error, or does it not execute? Try putting print("sending") in the local script and then print("received") in the server script, and see if both print out

0

The output is completely clear plus it does work but only in the studio.

0

try putting the remote event in replicated storage

0

If the RemoteEvent is in workspace, it should already be replicated. Maybe the actual game hasn't been updated? (ROBLOX is sometimes slow with applying your changes to the actual game.)