【发布时间】:2021-01-30 08:53:48
【问题描述】:
我目前正在为我的游戏编写脚本,但我遇到了一个问题。我的脚本无法正确执行,只是将边缘放在地图之外!如果有人可以调试这将是非常好的。 Scripting Helpers Link
--Services
local TS = game:GetService("TweenService")
local RS = game:GetService("RunService")
local HS = game:GetService("HttpService")
--Definers
local part = script.Parent.SpawnTherm:WaitForChild("Moving")
while wait(4) do
--Defining Tables and Table Editing
local mathRandom = math.random(2.5, 4)
local goal = Vector3.new(0.7, mathRandom, 0.05)
local tweenInfo = TweenInfo.new(
4,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out,
0,
false,
0
)
while wait(1) do
part.Position = Vector3.new(part.Position.X, part.Position.Y, part.Position.X)
wait(0.05)
end
local Tween = TS:Create(part, tweenInfo, {Size = goal})
Tween:Play()
end
【问题讨论】:
-
Heyo reidlab,您能更具体地说明您要做什么吗?你说脚本不起作用,但你想让它做什么?
-
它每隔几秒钟编写一个脚本,它使一个部分延伸,而不是在一个方向上过度延伸,所以只能在一个方向上缩放,它有一个比例可供选择,然后对比例动画进行补间以便它移动,所以它是一个浮动缩放移动条!
标签: loops lua lua-table roblox lua-5.1