What do you want to achieve? Keep it simple and clear!
Alright, so as I was watching and following along the tweenservice from TheDevKing tutorial.
I want the BaseStar to do the same info on the variable (Goal). Such as increasing the Size of the part, changing the brickColor, setting the transparency to .5 and the Collision and kill a player when they come in contact with the part.
What is the issue? Include screenshots / videos if possible!
it tweens all together smoothly but it stops halfway and doesn’t go all the way up. There is no errors…
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried doing some research on google and developer forum but couldn’t find a way to fix it.
I really hope someone could help me with this.
Thanks!
wait(5)
print("Starting TweenService!")
local Tween = game:GetService("TweenService")
local BaseStar = game.Workspace.BaseStar
local info = TweenInfo.new(
10,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local Goals = {
Size = Vector3.new(120, 98, 122);
CanCollide = false;
Color = Color3.new(1, 0, 0);
Transparency = .5
}
local MakePartBigger = Tween:Create(BaseStar, info, Goals)
wait(1)
MakePartBigger:Play()
BaseStar.Touched:Connect(function(hit)
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
if Humanoid then
Humanoid.Health = 0
print("Successfully killed a player..")
end
end)
Try removing the CanCollide goal. I might be wrong (since bools are listed as tweenable in the API reference) but I don’t think it’s a property that can be tweened.
hey, @Crictoli I have another problem. I made a new tweenservice script I am trying to mess around with the code and practice with it. But it doesn’t tween when I run the game nor does it output any errors… can you help me?
local TWS = game:GetService("TweenService")
local TweenPart = game.Workspace.TweenPart
local mation = TweenInfo.new(
1.5,
Enum.EasingStyle.Elastic,
Enum.EasingDirection.Out,
0,
true,
0
)
local PropertiesGoal = {
Size = Vector3.new(120*2, 98*2 , 122*2);
Color = Color3.new(0.333333, 1, 0);
Transparency = .5;
Position = workspace.Gb.Position
}
local Bigger = TWS:Create(TweenPart, mation, PropertiesGoal)
wait(1.5)
Bigger:Play()