In a lot of things you use RemoteFunction in people who use it is very important even if it is very important to you
Now you understand what RemoteFunction , and now let’s Program
The things you need to use:
- Create a LocalScript on StarterPlayerScripts
- and Create a Script on ServerScriptService
- and Create a RemoteFunction on ReplicatedStorage
- and Create a Part and Create a ClickDetector
LocalScript:
local rs = game:GetService("ReplicatedStorage")
local rf = rs:WaitForChild("RemoteFunction")
local workspace = game:GetService("Workspace")
local Part = workspace:WaitForChild("Part")
Part.ClickDetector.MouseClick:Connect(function()
rf:InvokeServer()
end)
Script:
local rs = game:GetService("ReplicatedStorage")
local rf = rs:WaitForChild("RemoteFunction")
local workspace = game:GetService("Workspace")
local Part = workspace:WaitForChild("Part")
local names {
"your name Account or UserId"
}
rf.OnServerInvoke:Connect(function(plr)
for i,v in pairs(names) do
if v == plr.Name then
Part.Transparency = 1
end
end
end)
As far as I know, if you put a UserId, you have the right to delete the name, and then put the UserId
Website link: RemoteFunction