So I am wondering how I can get the player when they click the player so I can fire the client when they click the part. But I don’t know how I can get the player. How can I get the player?
Here is my script so far:
script.Parent.ClickDetector.MouseClick:Connect(function(click)
local remote1 = game:GetService("ReplicatedStorage").SecretDoor:FindFirstChild("Fade")
remote1:FireClient()
end)
ClickDetectors send the player who clicked, in their parameters.
script.Parent.ClickDetector.MouseClick:Connect(function(click)
local remote1 = game:GetService("ReplicatedStorage").SecretDoor:FindFirstChild("Fade")
remote1:FireClient(click) -- 'click' is the player
end)