Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I find "Head" inside of a few Models and turn its Transparency = 0?

Asked by 10 years ago

How would I make ascript to go into models (with different names) and find a Part named "Head" inside them? And then turn them Transparency = 0?

01local ting = 0 
02owner = script.Parent.Parent.Parent.OwnerName
03 
04function onTouched(hit)
05 
06    if ting == 0 then -- debounce
07        ting = 1 -- debounce
08        local check = hit.Parent:FindFirstChild("Humanoid")
09 
10        if check ~= nil then -- debounce
11            local user = game.Players:GetPlayerFromCharacter(hit.Parent)
12            local cost1 = script.Parent.Cost
13            local cost = user:FindFirstChild("leaderstats"):FindFirstChild("Dollars")
14            local user = game.Players:GetPlayerFromCharacter(hit.Parent)
15 
View all 70 lines...

Answer this question