I created a shooter called Invisible Targets, and so far most of it works, the catch of the game is that everyone is invisible basically I decided to create a cosmetic detail / feedback that on death, the already invisible player becomes visible.
This was the code I created but I can't seem to understand how to make things work
larm = script.Parent:findFirstChild("Left Arm") rarm = script.Parent:findFirstChild("Right Arm") head = script.Parent:findFirstChild("Head") torso = script.Parent:findFirstChild("Torso") lleg = script.Parent:findFirstChild("Left Leg") rleg = script.Parent:findFirstChild("Right Leg") function OnDeath() print("test") wait(.000001) larm.Transparency = 0 rarm.Transparency = 0 head.Transparency = 0 torso.Transparency = 0 lleg.Transparency = 0 rleg.Transparency = 0 end
local plr = game.Players.LocalPlayer local chr = plr.Character function grabPlayer(p) function playerDied() local chrParts = chr:GetChildren() for i, v in pairs(chrParts) do if v:IsA("Part") then v.Transparency = 0 end end end chr.Humanoid.Died:connect(playerDied) end game.Players.PlayerAdded:connect(grabPlayer)
Did I do this right? ;)
Well, I solved my problem by grabbing and editing parts of a ragdoll script, thanks anyways dude