Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you make a character invisible,frozen,and non-collidable while being able to reset?

This is the script that I thought of:

hit = Workspace.WiseDumbledore
for _,ch in ipairs(hit:GetChildren()) do
if ch.className == 'Part' then
ch.Transparency = 1
ch.CanCollide = false
ch.Anchored = true
end
end

This poses a few problems. When

ch = hit.Head

or

ch = hit.Torso

The line

ch.CanCollide = false

will be non effective. Also the face will not be invisible. Others suggested:

Workspace.WiseDumbledore: remove()

and

Workspace.WiseDumbledore.Parent = "Lighting"

These scripts will not allow the target to reset. Please help.

Thanks WiseDumbledore

4 comments

0

You want to take away the ability to reset? That's impossible.

0

Sorry, read that wrong. You can't take away the ability to reset without making a custom humanoid.

0

Actually, just rename the player's humanoid. That disables resetting. But, we are off topic here. That isn't what the OP wanted.

0

You guys dont get it. I want to do all that, while being able to reset, cause the last two scripts will not allow you to reset.

3 answers

local hitPart = Workspace.WiseDumbledore
local player = Game.Players:GetPlayerFromCharacter(hitPart)
if player then
    for index, object in pairs(player.Character:GetChildren()) do 
        if object:IsA("BasePart") then 
            object.Transparency = 1 
            object.CanCollide = false
            object.Anchored = true
            if object:FindFirstChild("face") then 
                object.face.Transparency = 1 
            end 
        elseif object:IsA("Hat") and object:FindFirstChild("Handle") then 
            object.Handle.Transparency = 1
            object.Handle.CanCollide = false
            object.Handle.Anchored = true
        end
    end
end

1 comment

0

This does not work again, when your object gets to the head or torso, object.CanCollide = false is noneffective. Thanks

function onTouch(part) 
	local humanoid = part.Parent:FindFirstChild("Humanoid") 
	if (humanoid ~= nil) then	-- if a humanoid exists, then
		humanoid.Parent.Torso.Anchored = true	
	end 
end

script.Parent.Touched:connect(onTouch)

And for disable reset (Put in StarterGui and make sure it's a localscript)

function onTouch(part) 
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
end

game.Workspace.Part.Touched:connect(onTouch)

Make sure the "Part" is changed to your bricks name

This will work... You cant Move, or be interacted with. At the same time you CAN reset.

function Freeze(char)
if char and char:IsA("Model") then
for i,v in pairs(char:children()) do
if v.className == "Part" then
v.Transparency = 1
v.CanCollide = false
end
if v.className == "Hat" then
v.Handle.Transparency = 1
v.Handle.CanCollide = false
v.Handle.Anchored = true
end
if v.Name == "Head" then
v.face.Transparency = 1
end
end
end
end

--If you want to freeze a player, Do Freeze(game.Players.Roblox.Character)

This discussion is preserved as it was. New answers, comments, and votes are closed.