#Bug Code
1 messages · Page 1 of 1 (latest)
try Part1.Transparency = Part1.Transparency + 0.1
That does nothing lmao
thats worked for me when ive used that so idk
Matter of fact its a longer way
Im not in studio so i cant do much and the code seems to be fine
Ah
I see it now
Move the if part.transparency == 1 in the while loop
And it should would
I found out that i was comparing a float to a direct integer
local Part1 = game.Workspace.Part1
Part1.Transparency = 0
Part1.Touched:Connect(function()
while Part1.Transparency < 1 do
Part1.Transparency += 0.1
task.wait(0.1)
end
if Part1.Transparency >= 1 then
Part1.CanCollide = false
end
end)
Part1.TouchEnded:Connect(function()
while Part1.Transparency > 0 do
Part1.Transparency -= 0.1
task.wait(0.1)
end
if Part1.Transparency <= 0 then
Part1.CanCollide = true
end
end)