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

Cloning a union from ServerStorage. It works fine, but how do I make it visible to other players?

I have a RemoteEvent firing (from a local script) when the player chats ":pc 5" and a script in ServerScriptService that when the event is fired, Clones the union into the player (their character) who chatted ":pc 5", but the issue is that the union is still local. Does anyone know how to fix this? Server in ServerScriptService:

game.ReplicatedStorage.Circles.Make.OnServerEvent:connect(function(player,number)
	print(player) print(number)
	
	if game.Workspace[player.Name]:FindFirstChild("5") then game.Workspace[player.Name]:FindFirstChild("5"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("6") then game.Workspace[player.Name]:FindFirstChild("6"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("7") then game.Workspace[player.Name]:FindFirstChild("7"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("8") then game.Workspace[player.Name]:FindFirstChild("8"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("9") then game.Workspace[player.Name]:FindFirstChild("9"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("10") then game.Workspace[player.Name]:FindFirstChild("10"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("11") then game.Workspace[player.Name]:FindFirstChild("11"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("12") then game.Workspace[player.Name]:FindFirstChild("12"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("13") then game.Workspace[player.Name]:FindFirstChild("13"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("14") then game.Workspace[player.Name]:FindFirstChild("14"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	if game.Workspace[player.Name]:FindFirstChild("15") then game.Workspace[player.Name]:FindFirstChild("15"):Destroy() end--.Parent = game.Players[player.Name].Backpack.Circles end
	
	wait()	
	
	local clone = game.ServerStorage.Circles[number]:Clone() 
	clone.Parent = game.Workspace[player.Name]
	if (player.Name) == "keegaroo65" then clone.BrickColor = BrickColor.new("Lapis") end
end)

9 comments

0

Can we see the script? The union should be server side assuming it is cloned and parented on the server using the Remote Event.

0

The one in ServerScriptService?

0

Just added the script there.

0

Assuming that is running (Add a print to confirm it is) then it should be working just fine.

0

Well the union is visible so that proves it's running. It just doesn't appear for other players.

0

Try making the parent the workspace and see if it appears for the player then.

0

Alright. I'll try it

0

When the unions parent is game.Workspace, it is visible to all players. The problem with that is, the union is inside the player so it can follow them around.

1 answer

✓ Accepted answer

Welding was in a local script, fixed.

1 comment

0

Thanks!

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