I am making a script and when you touch a brick, your walkspeed will go up. The error is: Player is not a valid member of Workspace. It also said: Disconnected event because of exception
local part = game.Workspace.Lvl1Boost
part.Touched:connect(function()
game.Workspace.Player.Humanoid.WalkSpeed = 50
end)
This script is when you touch it you die. The error is: Player is not a valid member of Workspace. It also said: Disconnected event because of exception
local part = game.Workspace.DeathBed
part.Touched:connect(function()
game.Workspace.Player.Humanoid.Health = 0
end)
NOTE - DeathBed and Lvl1Boost are both parts.

2 comments
Should Humanoid be a local variable?
Not necessarily, but it's a good habit to take up on.