This is the code, I also do not get any errors in output for the script. The part always stays the same transparency (1), any help would be appreciated

local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

while wait() do
	local dist = (char.HumanoidRootPart.Position - game.Workspace.Part.Position).Magnitude 
	game.Workspace.Part.Transparency = math.clamp(dist,0,1)
end

1 comment

0

I don't know dude sry I could not help