Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make the tweened part not collide with player-colliding parts?

I got this script, but the wave doesn't go through parts, even though it should... How do i make this work? (It worked when i used CFrame)

local tween_s = game:GetService("TweenService");
local ending_x, End = -9.841, 0;
local Tsunami = script.Parent;

local props = {Position = Vector3.new(ending_x, -5, End)};
local speed = 15; -- The amount of seconds it will take to arrive at its location.
local info = TweenInfo.new(speed, Enum.EasingStyle.Linear, Enum.EasingDirection.In);
local tween = tween_s:Create(Tsunami, info, props);

tween:Play();

2 answers

I had the same day problem a while ago.

You’re changing the position which as you might know, avoids blocks when placed inside of them.

Try using CFrame instead on line 5

3 comments

0

how do i do that? It doesn't work when i replace Vector3 with CFrame

0

Take a look at CFrame structure http://wiki.roblox.com/index.php?title=CFrame, it would be CFrame.new(PositionVector3)

0

That also doesnt work...

You should Tween the CFrame instead of the position. Basically you just need to change line 5 to CFrame = CFrame.new where you have it saying Position = Vector3.new

The reason this is, is CFrame avoids collisions and physics, so is able to pass through parts as if they are not there.

See below:

local tween_s = game:GetService("TweenService");
local ending_x, End = -9.841, 0;
local Tsunami = script.Parent;

local props = {CFrame = CFrame.new(ending_x, -5, End)};
local speed = 15; -- The amount of seconds it will take to arrive at its location.
local info = TweenInfo.new(speed, Enum.EasingStyle.Linear, Enum.EasingDirection.In);
local tween = tween_s:Create(Tsunami, info, props);

tween:Play();

TweenService

This discussion is preserved as it was. New answers, comments, and votes are closed.