Why are tools/pets in replicated storage invisible to others but not the user that owns them?

Hello, I am currently working on a simulator and the tools and pets that the user can buy are invisible to other players but not to the user that owns the item/pet. It would be great if you could have a solution.

This is probably because your are cloning the tools/pets via a local script. In this case, you would need to use a Remote Event, from client to server. Can you show us your method of cloning the tools/pets?

Yes, I am using a local script let me get the code for you.

This sounds like a FilteringEnabled problem that desperately needs RemoteEvents. Though, I’m unsure considering you haven’t posted the code yet.

Is it normal for studio to be glitching, it does not seem to open?

Please provide us with code otherwise we cannot help you.

He already said he was going to get the code.

Two scripts, a local and a module are in the tool.

local script:
local module = require(script.Parent:WaitForChild(“ModuleScript”))

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()

module.Lift()

end)


module script :

local module = {}
local replicatedStorage = game:GetService(“ReplicatedStorage”)

function module.Lift()

replicatedStorage.Remotes.Lift:FireServer()

end

return module

Two scripts, a local and a module are in the tool.

local script:
local module = require(script.Parent:WaitForChild(“ModuleScript”))

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()

module.Lift()

end)


module script :

local module = {}
local replicatedStorage = game:GetService(“ReplicatedStorage”)

function module.Lift()

replicatedStorage.Remotes.Lift:FireServer()

end

return module
.

Are the items already in the player’s backpack when they spawn in the game?

no, they are purchased from a shop

Can you show me the script that you use for your purchase system?

one item is spawned when u join and that item can be seen by everyone because it is in starter gui and not in replicated storage

Two scripts, a local and a module are in the tool.

local script:
local module = require(script.Parent:WaitForChild(“ModuleScript”))

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()

module.Lift()

end)


module script :

local module = {}
local replicatedStorage = game:GetService(“ReplicatedStorage”)

function module.Lift()

replicatedStorage.Remotes.Lift:FireServer()

end

return module
…

1 Like

is this what you’re using for the shop? If not, can you send us the shop code?

1 Like

those codes were placed inside of the tool, let me see if the studio opens so i can get the shop scripts

1 Like

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function(click)
if player.leaderstats.Coins.Value >= 2000 then
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 2000

	game.ReplicatedStorage.Tools.SapphireBrick:Clone().Parent = player:WaitForChild("Backpack")
end

end)

1 Like

Ok so like we said before, you need to use a remote event for this. You are able to send information from client to server or vice versa using these.

Local Script:

local remote = game.ReplicatedStorage.RemoteEvent --you can change this

script.Parent.MouseButton1Click:Connect(function()
    remote:FireServer()
end)

Server Script:

local remote = game.ReplicatedStorage.RemoteEvent --you can change this

remote.OnServerEvent:Connect(function(player)
    if player.leaderstats.Coins.Value >= 2000 then
        player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 2000
        game.ReplicatedStorage.Tools.SapphireBrick:Clone().Parent = player:WaitForChild("Backpack")
    end
end)
1 Like

Also, let me ask you, do you have multiple items that do this same thing?

1 Like

yes, multiple items are being sold in the shop with the same scripts just price is different

1 Like