local RemoteEvent = Instance.new("RemoteEvent", script.Parent)
RemoteEvent.Name = "Transparency"
if part.Parent == workspace then
if part.Locked == false then
if part.Transparency == 1 then
part.Transparency = 0
part.Transparency = part.Transparency + 0.1
I’m making BTools for my game, however this transparency script doesn’t check if transparency is already 1 and just keeps raising it.
Unless you’re also doing this for Lua 5.3 (or vanilla Lua), you could do, to save typing
part.Transparency += 0.1
You can do
To add to that, Lua 5.1 numbers cannot represent values over 2 ^ 53 safely, also float is ambiguous, it can refer to single (32-bit) or double (64-bit), Lua 5.1 uses double.
For more information see: https://0.30000000000000004.com/