I'm confused how Remote Events work. I made a remote event in replicated storage named "GearGet" and I have a local script in starter player scripts. The local scripts job is, when a part (pointPart) is touched, it should turn pointPart green, make a model transparent, and give a point to the player who touches pointPart.
I want pointPart to turn green and the model to be transparent only for the person who touched pointPart. I've been told to do this I need to use a remote event but I have no idea how that works. This is how I attempted to do it:
(Local script in starter player scripts):
local replicatedStorage = game.ReplicatedStorage
local GearGetRemote = replicatedStorage:WaitForChild("GearGet")
local pointPart = game.Workspace.FullGear.GearGiver
-- Colors
local blue = Color3.fromRGB(0, 0, 255)
local green = Color3.fromRGB(0,255,0)
-- Services needed
local Players = game:GetService("Players")
local canGet = true
GearGetRemote.OnClientEvent:Connect(function (otherPart)
local humanoid = otherPart.Parent:FindFirstChild('Humanoid')
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
local currentColor = pointPart.Color
local model = game.Workspace.FullGear.Gear
if humanoid and player and canGet and currentColor == blue then
canGet = false
player.leaderstats.Gears.Value = player.leaderstats.Gears.Value + 1
print("Giving player gear")
pointPart.Color = green
for i, block in model:GetChildren() do
if block:IsA("Part") or ("UnionOperation") then
block.Transparency = 0.5
elseif humanoid and player and canGet and currentColor == green then
print("Player already recieved gear")
end
end
end
end)
Server script in Server Script Service:
local replicatedStorage = game.ReplicatedStorage
local GearGetRemote = replicatedStorage:WaitForChild("GearGet")
GearGetRemote.OnServerEvent:Connect(function(player,...)
print(player.Name)
print(...)
end)
GearGetRemote:FireAllClients()
I don't know how to fire the "GearGetRemote" Remote event when someone touches pointPart though. I feel like I'm either over thinking it, or doing it completely wrong. I looked up a youtube tutorial on how to use Remote Events and I don't really understand it.

2 comments
A lot of your thing such as changing player values and the color of parts should be done in a server script if you want everyone to see the change based on what you are doing.
Use a .Touched event and name the object that touched the part hit. do if hit.parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then GearGetRemote:FireClient(player) fires to the player that touched the part. Use the functions and examples I've given you to mold your code into your desired outcome. I've started the engine, you drive...