Hello! I need help on making a block appear on a player with a ;freeze chat command. I have the command down and it freeze’s you, but I want a block to appear on you. This script is in serverscriptservice.
Thanks!
here is The main part I need help on
local Ice = workspace.Ice
Ice.CFrame = Player.Character.HumanoidRootPart.CFrame + Vector3.new(5,13,5)
here is the whole script
–// Services \–
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 Ice = workspace.Ice
local Valid = CheckForTarget(Target)
if Valid then
local remwalk = Target.Character.Humanoid.WalkSpeed
local remjump = Target.Character.Humanoid.JumpPower
Ice.CFrame = Player.Character.HumanoidRootPart.CFrame + Vector3.new(5,13,5)
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)