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

How do you make local parts if filtering is enabled?

I'm trying to make it so a part is invisible for only one person but with filtering enabled it won't let me directly make it invisible from the client. When I used an RemoteEvent it still changed it for everyone.

Local Script:

Storage = game:GetService("ReplicatedStorage")
trans = Storage.trans
workspace.SpawnLocation.ClickDetector.MouseClick:connect(function()
	trans:FireServer()
end)

Server Side Script:

Storage = game:GetService("ReplicatedStorage")
trans = Storage.trans
function transp()
	workspace.SpawnLocation.Transparency = workspace.SpawnLocation.Transparency + 0.1
end
trans.OnServerEvent:Connect(transp)

2 answers

✓ Accepted answer

To make it invisible for one person, just change its transparency on the client side only.

Storage = game:GetService('ReplicatedStorage')
workspace.SpawnLocation.ClickDetector.MouseClick:Connect(function()
        workspace.SpawnLocation.Transparency = workspace.SpawnLocation.Transpareny + 0.1
end)

Local Script:

Part.Transparency = 1

Using a remote event makes it so that the server receives the message too and changes it for all clients. In this case, you want to change it for just the client, so you only use a local script with no remote event.

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