我目前正在为我的游戏编写脚本,但我有一个问题。我的脚本无法正确执行,只是将边缘放在地图之外!如果有人可以调试这将是非常好的。 脚本助手链接
--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