I'm trying to make a script where a block spawns exactly on a player upper-torso but high in the skies then later on the block size with increase in the y-axis until it touches back down the ground.
local enabled = true
Player = script.Parent.Parent
me = Player
mouse = Player:GetMouse()
function onKeyDown(key)
if not enabled then return end
enabled = false
key = key:lower()
if key == "t" then
local Run = game:GetService("RunService")
local clone = script.Rotate:Clone()
clone.Parent = Player.PlayerGui
clone.Disabled = false
game:GetService("Chat"):Chat(Player.Character.Head, "Run Away kids, Please. . .")
for i = 1, 1 do
wait(3)
clone:remove()
local g = script.Beam:Clone()
g.Parent = game.Workspace
g.CFrame = Player.Character.UpperTorso.CFrameCFrame.new(0, 60, 0)
g.Orientation = Vector3.new (0, 0, -90)
local y = Instance.new("BodyVelocity")
script.Damage:Clone().Parent = g
wait(2)
for i = 1,20 do
g.Size = g.Size + (0, -0.01, 0)
wait(2)
end
g:remove()
wait()
for i = 1, 12 do
end
Run.Stepped:wait(0.0001)
Run.Stepped:wait(0.0001)
end
wait(0.5)
end
enabled = true
end

4 comments
Don't use KeyDown. Use UserInputService instead
Yeah, Incapaz true
k
on line 22 you put 2 cframes