How to use a RemoteFunction on Roblox Studio

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:

  1. Create a LocalScript on StarterPlayerScripts
  2. and Create a Script on ServerScriptService
  3. and Create a RemoteFunction on ReplicatedStorage
  4. 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

1 Like

i think its better you put this in #resources:community-tutorials

2 Likes

I’m sure somebody else already did this tutorial, but as well; move it to #resources:community-tutorials

and your script is wrong, lots of typos. one is the names table on the script

2 Likes

I’ve ironed it before, and didn’t get anything