Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago
Edited 6 years ago

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)
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. LegitmateTrades 159 — 6y
0
The one in ServerScriptService? keegaroo65 11 — 6y
0
Just added the script there. keegaroo65 11 — 6y
0
Assuming that is running (Add a print to confirm it is) then it should be working just fine. LegitmateTrades 159 — 6y
View all comments (5 more)
0
Well the union is visible so that proves it's running. It just doesn't appear for other players. keegaroo65 11 — 6y
0
Try making the parent the workspace and see if it appears for the player then. LegitmateTrades 159 — 6y
0
Alright. I'll try it keegaroo65 11 — 6y
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. keegaroo65 11 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Welding was in a local script, fixed.

0
Thanks! keegaroo65 11 — 6y
Ad

Answer this question