As far as I understand remote function needed in order to send information from script to local script and and make the requested action on the server. Okay, i watched a lot of videos and read a lot of explanations on the forums, but i still didnt understand how to use Remote Function. I have 1 script and 1 local script. I need players who have BoolValue = false to have Speed = 0 at a certain point. I could use RemoteEvent, but it easy to exploit, so thats why i want Remote Function. For example:
--Script
speed = 0
game.ReplicatedStorage.Speed:InvokeClient(speed)
--Local Script
local function teleportdetected(speed)
if Value == false then
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = speed
end
end
game.ReplicatedStorage.Speed.OnClientEvent:Connect(teleportdetected)

1 comment
You need to put the player in the first parameter of line 3 game.ReplicatedStorage.Speed:InvokeClient(player, speed)