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

How do I make a character invisible?

Asked by 8 years ago

So, when the player joins the game I want them to become invisible immediately. Also, i'd like for there to be a blue fire put into the torso (which I think I know how to do) because it is meant to represent their soul. Anyways, I think it'd go something like this but I don't really know...

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
local fire = Instance.new("Fire",character.Torso)
fire.Color = 85, 170, 255
fire.SecondaryColor = 0, 70, 255
        for _, child in pairs(character:GetChildren()) do
    if child.ClassName == 'Part' then
child.Transparency = 1
    end
end)

Its not working so it obviously isn't right... Please help?

1 answer

Log in to vote
0
Answered by 8 years ago

Your problem is in line 4, you're not using Color3(). Line 4, and 5 should look like this:

fire.Color = Color3.new(85, 170, 255)
fire.SecondaryColor = Color3.new(0, 70, 255)

Everything else seems fine.

0
Color3 takes a value between 0 and 1. If you want to do it between 0 and 255, you have to divide it by 255 to again get a number between 0 and 1: Color3.new(85/255, 170/255, 1) Perci1 4988 — 8y
0
Oh, thanks. Operation_Meme 890 — 8y
0
Thanks guys, that worked. Although I did have to add a few 'ends' to the script after realizing it. It works now. clalexander 40 — 8y
Ad

Answer this question