How To Make A Part Appear On A Player

Hi guys! Today I need help make a part appear on a player when they type ;Freeze me. I have the command down and it freezes you but I want a block to appear on you. I would want the block to be a part, like this


size 5, 13, 5 Thanks!

local Players = game:GetService(“Players”)
–// Settings \–
local Prefix = ‘;’
local Admins = {
[‘AmphibionPlayzDev’] = ‘Admin’;
}
–// Functions \–
local function CheckForTarget(Target)
if not Target then
warn(‘Target is not valid’)
return false
else
print(‘Target is valid’)
return true
end
end
Players.PlayerAdded:Connect(function(Player)
if Admins[Player.Name] then
print(‘Admin’…Player.Name…’ has joined the game freeze’)
Player.Chatted:Connect(function(Msg)
if Msg:sub(1,8) == Prefix…'freeze ’ or Msg:sub(1,8) == Prefix…'Freeze ’ then

			local PlayerName = Msg:sub(9)
			local Target = nil		

			if PlayerName == "me" or "Me" then
				Target = Player				
			else	
				Target = Players:FindFirstChild(PlayerName)
			end
			
			local Valid = CheckForTarget(Target)
			
			if Valid then				
				
				local remwalk = Target.Character.Humanoid.WalkSpeed
				local remjump = Target.Character.Humanoid.JumpPower
				
				Target.Character.Humanoid.WalkSpeed = 0
				Target.Character.Humanoid.JumpPower = 0
				wait(15)
				Target.Character.Humanoid.WalkSpeed = remwalk
				Target.Character.Humanoid.JumpPower = remjump 
			end
		end
	end)		
end

end)

Let me clarify with you. So you want a part to be visible only for the player who is frozen?

no, I would want it to be visible for all players, but just the block goes on you not anyone else

So you want the block to attach to a player?

yes, and i want it to be visible for 15 seconds

You can set the part CFrame to the Players HumanoidRootPart CFrame then you can use + Vector3.new() to raise it etc if needed.

so i have never used this type of code before but what you are saying is
CFrame.Players.HumanoidRootPart.CFrame:Vector3.new()?

No. Here’s an Example.

YourPartYouWantToAttach.CFrame = PlayerObject.Character.HumanoidRootPart.CFrame + Vector3.new(0,0,0) —Change this

so i got the YourPartYouWantToAttach.CFrame done but what would PlayerObject. The object you want to be attached?