Ad
Log in to vote
0

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

Asked by 3 years ago

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

0
You want to take away the ability to reset? That's impossible. Shawnyg 3596 — 3y
0
Sorry, read that wrong. You can't take away the ability to reset without making a custom humanoid. PiggyJingles 343 — 3y
0
Actually, just rename the player's humanoid. That disables resetting. But, we are off topic here. That isn't what the OP wanted. Articulating 1317 — 3y
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. WiseDumbledore 15 — 3y

3 answers

Log in to vote
1
Answered by 3 years ago
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
0
This does not work again, when your object gets to the head or torso, object.CanCollide = false is noneffective. Thanks WiseDumbledore 15 — 3y
Ad
Log in to vote
0
Answered by 1 month ago
Edited 1 month ago
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

Log in to vote
-1
Answered by
MixCorp 65
3 years ago

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)

Answer this question



Ad