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)