How do I change the properties of a part for only one player?
So I'm trying to create a part where once you get in a certain radius of it, it will be outlined using a SelectionBox. This works perfectly fine, except when one player goes in the specified radius of the part, the part gets outlined for every player instead of just that one player. I'm doing this using a local script inside the PlayerGui that changes the transparency of the SelectionBox when you get close enough, so shouldn't it only happen for the LocalPlayer if I'm using a local script? This is what I have inside my local script in the player gui:
01 | Task 1 Part = workspace:WaitForChild( "Task1Part" ) |
02 | Task 1 Trigger = Task 1 Part:WaitForChild( "Task1Trigger" ) |
03 | SelectionBox = Task 1 Part:WaitForChild( "SelectionBox" ) |
05 | Task 1 Trigger.Touched:Connect( function (Toucher) |
06 | if Toucher.Parent.Humanoid and Toucher.Name = = "HumanoidRootPart" then |
07 | SelectionBox.Transparency = 0 |
11 | Task 1 Trigger.TouchEnded:Connect( function (Toucher) |
12 | if Toucher.Parent.Humanoid and Toucher.Name = = "HumanoidRootPart" then |
13 | SelectionBox.Transparency = 1 |
So basically what I want to know is, how do you change the properties of an instance in the workspace for only one player? I have filtering enabled on and experimental mode off, and I can't figure it out, so any help would be highly appreciated. Thank you for reading!