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

How to find LocalPlayer from a part that touches a part?

I'll try to explain best I can.

I'm using .Touched to know when a part touches a part, and that works fine. But I want it to only fire for the LocalPlayer. It currently fires for everyone in the server.

Current local script:

local Part = game.Workspace.finish
Part.Touched:Connect(function(Hit)
	if Hit.Name == "PushBlock" then
		game.Workspace.TEMPLEDOORS3.Interact.ProximityPrompt.Enabled = true
		game.Workspace.PushBlock.ProximityPrompt:Destroy()
		
		end

Thanks.

1 answer

Try using RemoteEvents.

RemoteEvents are one-way communication. Using RemoteEvents you can send Information. I show you the different ways of sending Information, Im going to tell you where :FireClient and :FireServer are

:FireClient()

:FireClient() appears ONLY on Server Scripts (Or normal scripts)

:FireServer()

Like earlier just only for Local scripts

Client

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