How do I make a character humanoid 1 transparent for an unlimited amount of time when it touches or collides into a part?
I will assume you mean one of the Players part such as torso. Here is what I think and what you may want.
game.Players.LocalPlayer.Character.Torso.Transparency = 1 ---Makes it invisible(invisibility is set from 0-1, visible to invisible)
game.Players.LocalPlayer.Character.Humanoid.Transparency = 1 ---That's seems what you are asking, but I doubt it will make the whole player invisible seeing how Humanoid is what basically holds the health of a player, and other things too.
If you want to make the player invisible you will have to individually make the parts of the player invisible. For things like RightArm or RightLeg I would do
game.Players.LocalPlayer.Character["RightArm"]
To make it where when the player touches a part you would do,
script.Parent.Touched:connect(function(hit) --Code here end)
That would assume that the script was in the part you want to execute code when touched.
You would have to check of the humanoid exist and use the parameter. That is generally how it is set up.
Simply because you cannot do spaces in Lua. Hope this helped!
Closed as Not Constructive by M39a9am3R
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?