I'm trying to freeze a single player that steps on a platform but it freezes all players, I can't seem to get it working.
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
--testing
workspace.TestPad.Touched:Connect(function(hit)
LocalPlayer.HumanoidRootPart.Anchored = true
end)

5 comments
you cant use localplayer in a script, u can only use it in localscripts, this is how u would fix ur script: game.Workspace.TestPad.Touched:Connect(function(Hit) if Hit.Parent:FindFirstChild('Humanoid') then Hit.Parent.HumanoidRootPart.Anchored = true end end)
it is a localscript
it is supposed to be a script, i sent u a friend request if u need more assistance, the name is StudioLegacy, and by the way the script should be in serverscriptservice or workspace
you cant use localplayer in a script, u can only use it in localscripts, this is how u would fix ur script
Server scripts are unable to access LocalPlayer since they are ServerSided. This means they don't know who the LocalPlayer is.