TweenService Issue

I am trying to tween a few parts, but instead the baseplate just slides up.

local sensor = script.Parent.Sensor
local door1 = script.Parent.Door1
local door1to = script.Parent.Door1To
local door2 = script.Parent.Door2
local door2to = script.Parent.Door2To
local tweenService = game:GetService("TweenService")

sensor.Touched:Connect(function()

	local tweeningInformation = TweenInfo.new(
		
		1, -- Length
		Enum.EasingStyle.Linear,
		Enum.EasingDirection.Out,
		0, 
		false,
		0 -- Delay
	)
	
	local partProperties1 = {
		Position = Vector3.new(door1to.frame.Position)
	}
	local partProperties11 = {
		Position = Vector3.new(door1to.glass.Position)
	}
	local partProperties12 = {
		Position = Vector3.new(door2to.frame.Position)
	}
	local partProperties122 = {
		Position = Vector3.new(door2to.glass.Position)
	}
	
	local Tween1 = tweenService:Create(door1to.frame,tweeningInformation,partProperties1)
	local Tween11 = tweenService:Create(door1to.glass,tweeningInformation,partProperties11)
	local Tween12 = tweenService:Create(door2to.frame,tweeningInformation,partProperties12)
	local Tween122 = tweenService:Create(door2to.glass,tweeningInformation,partProperties122)
	Tween1:Play()
	Tween11:Play()
	Tween12:Play()
	Tween122:Play()
	
end)

is there any errors on output?Becausei see there is nothing wrong with properties

Edit:Ok i think i know what is the problem

Nothing in the output. Its blank.

Use something like this
local sensor = script.Parent.Sensor
local door1 = script.Parent.Door1
local door1to = script.Parent.Door1To
local door2 = script.Parent.Door2
local door2to = script.Parent.Door2To
local tweenService = game:GetService("TweenService")
    script.Parent.Touched:Connect(function(touch)
    	local humanoid = touch.Parent:FindFirstChild("Humanoid") 
    	if (humanoid ~= nil) then
    		local tweeningInformation = TweenInfo.new(
		
		1, -- Length
		Enum.EasingStyle.Linear,
		Enum.EasingDirection.Out,
		0, 
		false,
		0 -- Delay
	)
	
	local partProperties1 = {
		Position = Vector3.new(door1to.frame.Position)
	}
	local partProperties11 = {
		Position = Vector3.new(door1to.glass.Position)
	}
	local partProperties12 = {
		Position = Vector3.new(door2to.frame.Position)
	}
	local partProperties122 = {
		Position = Vector3.new(door2to.glass.Position)
	}
	
	local Tween1 = tweenService:Create(door1to.frame,tweeningInformation,partProperties1)
	local Tween11 = tweenService:Create(door1to.glass,tweeningInformation,partProperties11)
	local Tween12 = tweenService:Create(door2to.frame,tweeningInformation,partProperties12)
	local Tween122 = tweenService:Create(door2to.glass,tweeningInformation,partProperties122)
	Tween1:Play()
	Tween11:Play()
	Tween12:Play()
	Tween122:Play()
    	end 
    end)

Edit i actually dont know if this works but i think the problem was that you did Touch but didnt say who touch sorry for grammar

It didn’t work.
Not sure why this is happening

It means that player touched not anything because when i did touch event before when crates was touching to baseplate i got cash but i wanted to make it when player touched So that means when player touched it will start working

Edit:can you say what you wanna achieve like when anything touches to your sensor it start doing that?

Edit2:Btw make sure your script is Script not LocalScript

:beverage_box: Hiya!

My personal suggestion is to make sure the user IS a humanoid and if it isn’t then it returns and ends the function.

are there any welds within the tweened part or the baseplate? there might’ve been a roblox-generated weld somewhere that welded the baseplate and cause it to be tween in conjunction

2 Likes

@Donzee_Boi Is the topic solved or you still have the issue

I removed all welds, and now the baseplate does not shoot up, but the parts don’t animate.

What do you mean the parts don’t animate? You mean they don’t tween? Why do you need the welds? If you’ve got multiple parts, weld them together but make sure they aren’t welded to the baseplate.