I was making a death Pillar script and it has no errors in the output, but in the client log, it says "can only tween objects in Workspace". Any ideas on how to fix?
--made by commag
local ChatService = game:GetService("Chat")
Plr = game.Players.LocalPlayer
Char = Plr.Character
TS = game:GetService("TweenService")
repeat wait() until Char
PG = Plr.PlayerGui
G = Instance.new("ScreenGui", PG)
MF = Instance.new("Frame", G)
MF.Size = UDim2.new(0.2,0,0.2,0)
MF.Style = "DropShadow"
MF.Position = UDim2.new(0.8,0,0.8,0)
EVal = Instance.new("StringValue", PG)
EVal.Value = "Unequipped"
T = Instance.new("TextButton", MF)
T.BackgroundTransparency = 1
T.Size = UDim2.new(1,0,1,0)
T.Text = "Death Pillar: " .. EVal.Value
T.TextScaled = true
M = Plr:GetMouse()
Casting = false
----------
M.Button1Down:connect(function()
if Casting == false and EVal.Value == "Equipped" then
Casting = true
ChatService:Chat(Char, "I will cleanse this world...", "Green")
wait(2)
ChatService:Chat(Char, "With The Pillar Of Death!", "Green")
Pillar = Instance.new("Part")
Pillar.Shape = "Cylinder"
Pillar.Size = Vector3.new(0.1,500,0.1)
Pillar.Rotation = Vector3.new(0,90,0)
Pillar.CFrame = CFrame.new(M.Hit.p)
Pillar.TopSurface = "Smooth"
Pillar.BottomSurface = "Smooth"
Pillar.BrickColor = BrickColor.new("Really black")
Pillar.Transparency = 0.4
Pillar.Material = "Neon"
Pillar.Anchored = true
Pillar.CanCollide = false
wait()
Pillar.Parent = workspace
local TIO = TweenInfo.new(
3,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
1,
true,
2
)
local Prop = {
Size = Vector3.new(35,500,35)
}
Pillar.Touched:connect(function(H)
if game.Players:GetPlayerFromCharacter(H.Parent) and H.Parent.Name ~= LS.Name then
H.Parent:BreakJoints()
end
end)
local Tween = TS:Create(Pillar, TIO, Prop)
Tween:Play()
Pillar:Destroy()
wait()
Casting = false
end
end)
T.MouseButton1Click:connect(function()
if EVal.Value == "Unequipped" and Casting == false then
EVal.Value = "Equipped"
elseif EVal.Value == "Equipped" and Casting == false then
EVal.Value = "Unequipped"
end
end)
while wait() do
T.Text = "Death Pillar: " .. EVal.Value
end

2 comments
which line has the problem?
There are no errors in the script output, however in the client log, it says "Can only tween objects in the workspace"