How do you make a model disappear on the touch of a brick? This is what I have.
waittime = 5 -- Time Between each hit
amnt = 1 --how much you get for it
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if (h~=nil) then
local thisplr = game.Players:findFirstChild(h.Parent.Name)
if (thisplr~=nil) then
local stats = thisplr:findFirstChild("leaderstats")
if (stats~=nil) then
local score = stats:findFirstChild("Points")
if (score~=nil) then
score.Value = score.Value + amnt
end
end
end
game.Workspace.Mod.Transparency = 1
game.Workspace.Mod.Disabled = true
wait(waittime)
game.Workspace.Mod.Transparency = 0
game.Workspace.Mod.Disabled = false
end
end
script.Parent.Touched:connect(onTouched)
