Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to unfreeze the player after i froze them?

Asked by 4 years ago
Edited 4 years ago

I made a script that freezes the player upon joining and when they Deploy they are unfrozen and teleported.

--//  Author: EnzoTDZ_YT

--//  Deployment

-- Unfreezer

DeploymentRequest.OnServerInvoke = function(Player, Request)
    Player.CharacterAdded:Connect(function(Character)
        for i, v in pairs(Character:GetChildren()) do
            if v.Name == "Humanoid" or v.Name == "Health" or v.Name == "Animate" or v.Name == "Body Colors" or v.Name == "Pants" or v.Name == "Shirt" or v.Name == "Shirt Graphic" then
                wait()
            else
                v.Anchored = false
            end
        end
    end)
end

That is the script for the un anchor script

--// Author: EnzoTDZ_YT

-- Freezer

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        for i, v in pairs(Character:GetChildren()) do
            if v.Name == "Humanoid" or v.Name == "Health" or v.Name == "Animate" or v.Name == "Body Colors" or v.Name == "Pants" or v.Name == "Shirt" or v.Name == "Shirt Graphic" then
                wait()
            else
                v.Anchored = true
            end
        end
    end)
end)

This script anchors upon joining

1
Hope this helps HappyJakeyBoy 67 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Try this instead i used a local findfirstchild() and was able to fix it !

DeploymentRequest.OnServerInvoke = function(Player, Request) -- Event
    local Character = game.Workspace:FindFirstChild(Player.Name) -- Locates Character
    for i, v in pairs(Character:GetChildren()) do -- Gets Anchored Parts
        if v.Name == "Humanoid" or v.Name == "Health" or v.Name == "Animate" or v.Name == "Body Colors" or v.Name == "Pants" or v.Name == "Shirt" or v.Name == "Shirt Graphic" then
            wait()
        else
            v.Anchored = false -- UnAnchors
        end
    end
end
1
Gonna try now EnzoTDZ_YT 275 — 4y
0
ok hope this helped you HappyJakeyBoy 67 — 4y
1
it works thanks :D EnzoTDZ_YT 275 — 4y
0
np HappyJakeyBoy 67 — 4y
Ad

Answer this question