Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

my script that makes a part less transparent the closer a player is wont work?

Asked by 2 years ago

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
0
I don't know dude sry I could not help legobuddie1 0 — 2y

Answer this question