So im trying to create a tile, that fades out then gets destroyed. I created this block of code:
local tile = script.Parent
tile.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
repeat
tile = tile.Transparency + 0.1
task.wait(0.1)
until
tile.Transparency == 1
tile:Destroy()
end
end)
However when im trying to use it i get this error:
''attempt to index number with ‘Transparency’"
Does someone know how to fix this? because im stuck