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

How do I make the whole NPC visible?

Asked by 4 years ago

game.Workspace.House21.Sp00ked1.???.Transparency = 0 what do I replace the ??? with?

This is the whole script:

local enabled = true

function onClicked(plr) if enabled == true then enabled = false script.Sound:Play() plr.Character.Humanoid.WalkSpeed = 0 plr.Character.Humanoid.JumpPower = 0 game.Workspace.House21.Sp00ked1.???.Transparency = 0 game.Workspace.House21.Windows.Glass.BrickColor = BrickColor.new("Deep Orange") game.Workspace.House21.Windows.Glass.Material = "Neon" game.Chat:Chat(game.Workspace.House21.SlideAnimationTest2, "Trick or Treat!", Enum.ChatColor.Blue) game.Workspace.House21.DoorPart.Transparency = 1 wait(3) game.Chat:Chat(game.Workspace.House21.SlideAnimationTest, "Happy Halloween! Have some candy!", Enum.ChatColor.Green) local stats = plr:WaitForChild('leaderstats'):WaitForChild('Candy') stats.Value = stats.Value + 5 wait(3) game.Workspace.House21.DoorPart.Transparency = 0 game.Workspace.House21.Windows.Glass.BrickColor = BrickColor.new("Black") game.Workspace.House21.Windows.Glass.Material = "Plastic" game.Workspace.House21.Sp00ked1.???.Transparency = 1 --[[game.Workspace.SlideAnimationTest.BodyVelocity.velocity = Vector3.new(0, -25, 0) game.Workspace.DoorPart.CanCollide = true wait(5) game.Workspace.SlideAnimationTest.BodyVelocity.velocity = Vector3.new(0, 0, 0) game.Workspace.DoorPart.CanCollide = false end]]-- wait(0.1) plr.Character.Humanoid.WalkSpeed = 16 plr.Character.Humanoid.JumpPower = 50 wait(15) enabled = true end end script.Parent.ClickDetector.MouseClick:connect(onClicked)

0
Please use code blocks kom297 -4 — 4y

1 answer

Log in to vote
0
Answered by
iuclds 720 Moderation Voter
4 years ago
local changeBack = true
local changeBackTime = 10
local npc = workspace.House21
for i,v in pairs(npc:GetDescendants()) do
    if v:IsA('BasePart') then
        local transparency = v.Transparency
        local oldtransparency = transparency
        v.Transparency = 1
        if changeBack then
            wait(changeBackTime)
            v.Transparency = transparency
        end
    end
end
0
didnt work Sp00ked1 6 — 4y
Ad

Answer this question