How would I do this?

Hi! How would I make an object disappear for a certain player, but not for the rest.

Example:

Once you find the item it disappears of your screen, but not anyone else’s.

Lemme know what solutions there might be to this.

You’d do this using a local script

1 Like

The best way to make the object disappear locally is to change the Transparency in a LocalScript. It won’t get replicated to the other players.

1 Like

Render it on the client (meaning, have the client parent the model into Workspace.CurrentCamera) and delete it locally. Things inside the players’ camera are not replicated to other clients. Note that the server cannot reference CurrentCamera since it’s across the client/server boundary for them, so you’ll have to replicate the objects somewhere like PlayerGui where both parties can see, and entrust the client to move it to their camera.

1 Like
--ServerScriptService - Script
local DeleteOnClient = Instance.new("RemoteEvent")
DeleteOnClient.Name = "DeleteOnClient"
DeleteOnClient.Parent = game.ReplicatedStorage

game.Players.PlayerAdded:Connect(function(Player)
	DeleteOnClient:FireClient(Player, workspace.Baseplate)
end)
--StarterPlayerScripts - Localscript
local DeleteOnClient = game.ReplicatedStorage:WaitForChild("DeleteOnClient")
DeleteOnClient.OnClientEvent:Connect(function(Inst)
	if Inst then
		pcall(function()
			Inst:Destroy()
		end)
	end
end)
2 Likes

So I could put my script awarding the badge, then set the transparency to 1 all inside the proximity prompt script.

This is basically for a treasure hunt sort of feature.