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

Is there a way to get 1 part in to everyones camera?

i am trying to do a part that will be in everyones camera/screen but if one of the person touches the part it should only disappear from his camera/screen not the others. is there a way to do that?

2 comments

0

Is your game Filtering Enabled?

0

Can't answer but you want to parent it to each and every camera (Local Script) then when it's touched, remove from that persons camera.

2 answers

✓ Accepted answer

Maybe try some type of RemoteEvent system when the part is touched like this:

** Server Code**

local Part = workspace.Part -- Change to the actual part being touched
local RemoteEvent = game.ReplicatedStorage.RemoteEvent -- Change to the actual RemoteEvent

Part.Touched:connect(function(Hit)
	local P = game.Players:GetPlayerFromCharacter(Hit.Parent)
	if P then
		RemoteEvent:FireClient(P)
	end
end)

Client Code

local Part = workspace.CurrentCamera.Part -- Change to the part being deleted
local RemoteEvent = game.ReplicatedStorage.RemoteEvent -- Change to the actual RemoteEvent

RemoteEvent.OnClientEvent:connect(function()
	if Part then
		Part:Destroy()
	end
end)

1 comment

0

thanks

Instead of using Filtering Enabled, you could use local parts, but it isn't supported by Roblox. Place a part into the clients camera and the client should only be able to see it.

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