Hello. I am trying to script a spleef tile and I am stuck on some parts of the script. How would I do this properly
local TweenServ = game:GetService("TweenService")
local part = script. parent
local TweenInf1 = TweenInfo.new(
3,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
true,
0
)
local Positions = {
Position = Vector3.new(script.Parent.Position.Y - 9.712), -- Im having trouble here. I dont understand how I would keep all the position angles wile subtracting from only the Y position.
}
local tween = TweenServ:Create(part, TweenInf1, Positions)
local check = true
script.Parent.Touched:Connect(function()
if check == true then
check = false
end
wait(1)
tween:Play()
wait(1)
script.Parent.CanCollide = false
script.Parent.Transparency = 0
wait(1)
script.Parent.CanCollide = true
script.Parent.Transparency = 1
script.Parent.Position = Vector3.new(script.Parent.Position.Y + 9.712)-- Im having trouble here. I dont understand how I would keep all the position angles wile subtracting from only the Y position.
check = true
end)
-- Y1 = 54.445
-- Y2 = 44.733
-- Total = 9.712