The title basically explains my question. I would love to see how this would be coded and stuff too. Having the colors of the beam just change instantly doesn’t really look as nice in my opinion. All help is appreciated
Yes, it is possible to fade between colors as long you can correctly assign the right type per attribute. It’s the same thing as position except you replace the table containing position with target color. Remember to use TweenInfo.RepeatCount
set to -1 for infinite looping…
The tricky part is when there are case scenarios like things turn 360 degrees which is equal to not rotating at all.
I tried this but it still doesn’t work.
BeamEndProperties =
{
Color = Vector3.new(255,0,0), Width0 = 300, Width1 = 800;
}
BeamTween = TweenService:Create(script.Parent.Beam, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.InOut, 0, false), BeamEndProperties)
BeamTween:Play()
If you want to tween color property you should instead write
BeamEndProperties = {
Color = Color3.fromRGB(255,0,0);
--add any other properties you want to tween in this table
}
I don’t fully understand what you are trying to do but i tried my best to guess. Hopefully this fixes your problem
local BeamEndProperties =
{
Color = Color3.fromRGB(255,0,0)
}
BeamTween = TweenService:Create(script.Parent.Beam, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.InOut, -1, false), BeamEndProperties)
BeamTween:Play()
you can change the -1 in tweeninfo to 0 if you dont want it to repeat
It also looks like you’re trying to tween the size of the beam? With this you would simply use the size property
It should look something like this
BeamEndProperties = {
Color = Color3.fromRGB(255,0,0);
Size = script.Parent.Beam.Size + Vector3.new(x,y,z) --replace x,y,z with whatever size you want
}
BeamTween = TweenService:Create(script.Parent.Beam, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.InOut, 0, false), BeamEndProperties)
BeamTween:Play()
I think you are assuming that the beam is a part. I am referring to the effect. Because when I try this this error shows up.
TweenService:Create property named ‘Color’ cannot be tweened due to type mismatch (property is a ‘ColorSequence’, but given type is ‘Color3’)
Oh yeah I did assume it was a part that’s my bad
Curious, but this says Vector3
and not any Color3
types. It should work, but you should wary of the types should match.
Now you need ColorSequence
.