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 9 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...

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

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

1 answer

Log in to vote
0
Answered by 9 years ago

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

1fire.Color = Color3.new(85, 170, 255)
2fire.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 — 9y
0
Oh, thanks. Operation_Meme 890 — 9y
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 — 9y
Ad

Answer this question