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

How to unfreeze the player after i froze them?

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 comment

1

Hope this helps

1 answer

✓ Accepted answer

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

4 comments

1

Gonna try now

0

ok hope this helped you

1

it works thanks :D

0

np

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