I have been trying to make a collapsible part that folds underneath you but the tweening won’t work. There’s no outputs whatsoever.
local TweenService = game:GetService("TweenService")
local TweenInfo = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false,
0
)
local Hinge = script.Parent.Parent.PrimaryPart
local Player = game.Players.LocalPlayer
local Characters = {}
table.insert(Characters, Player.Character)
function CollapsePlatform()
task.wait(1)
TweenService:Create(Hinge, TweenInfo, {Orientation = Vector3.new(90,0,0)}):Play()
task.wait(3)
TweenService:Create(Hinge, TweenInfo, {Orientation = Vector3.new(0,0,0)}):Play()
end
script.Parent.Touched:Connect(function(Hit)
print(Hit.Parent)
if table.find(Characters, Hit.Parent) then
CollapsePlatform()
end
end)
and may I ask whats the point of that condition? cause looking at your code its on a local script and it wouldnt replicate to other players so no need for that condition since itll only affect the local player
Wait, is the script parented to the part or is the script parented to the model?, if it’s parented to the model then it makes sense why it doesnt even work because models don’t have a .Touched property
(i realized that local scripts only run on certain spots )