How can i find the player from touched function

My Script:

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		hit.Parent.Humanoid.WalkSpeed = hit.Parent.Humanoid.WalkSpeed + 45
		script.Parent.CanTouch = false
		wait(0.1)
		script.Parent.Transparency = 0.4
		wait(0.1)
		script.Parent.Transparency = 0.6
		wait(0.1)
		script.Parent.Transparency = 0.8
		wait(0.1)
		script.Parent.Transparency = 1
		wait(3)
		script.Parent.CanTouch = true
		script.Parent.Transparency = 0.2
	end
end)

i want to somehow find the player from the Touched function so i can edit player’s leaderstats value for speed, is there anyone who knows how can i find the player by Touched function?

use

game.Players:GetPlayerFromCharacter(hit.Parent)

yes, or make it a variable like:

local Player = game.Players:GetPlayerFromCharacter(hit.Parent)

thx it worked! :wink: thanks for helping