I tried basically to "nest" it by putting one if statement under another and I even tried the "and" operator, this is what I have so far:
--drgigabyte
local broomOne = script.Parent.Parent
local messOne = game.Workspace.floormesses.mess1
local messTwo = game.Workspace.floormesses.mess2
local messThree = game.Workspace.floormesses.mess3
local cashOne = game.Players.LocalPlayer.leaderstats.Money
script.Parent.Touched:connect(function(hit)
if hit.Parent.Name == 'floormesses' then
wait(.2)
hit.Decal.Transparency = 1
cashOne.Value = cashOne.Value + 10
wait(.1)
script.Disabled = true
wait(6)
script.Disabled = false
end
end)
I'd like to have the second if be something like "If hit.Decal.Transparency > 1 then"

1 comment
But I also believe you could just do if hit.Parent.Name == 'floormesses' and hit.Decal.Transparency > 1 then