I am trying to change the WalkSpeed, the position, and a value but the script wont change it. After testing I found that the function works so it must be the code inside it.
Server Script:
game.ReplicatedStorage.CloseShop.OnServerEvent:Connect(function(player)
game.Workspace[player.Name]:FindFirstChild("Humanoid").WalkSpeed = 16
game.Workspace[player.Name].HumanoidRootPart.CFrame = game.Workspace.TPClosePart.CFrame
wait(2)
player.InShop.Value = false
end)
Local script:
game.ReplicatedStorage.CloseShop:FireServer()

2 comments
instead of searching for the player's name in the workspace just use Player.Character (https://developer.roblox.com/en-us/api-reference/property/Player/Character)
Also since this question was answered when we were in chat please add [Solved] to the title