Im trying to tween multiple frames in one script to the same position, i finished the script, didn't work(not surprised), but I got no errors. Little stumped. Any tips?
local RobuxFrame =script.Parent.Parent.RobuxFrame local MainFrame=script.Parent.Parent.MainFrame local MedicineFrame=script.Parent.Parent.MedicineFrame local ArmorFrame=script.Parent.Parent.ArmorFrame local UpgradeFrame =script.Parent.Parent.UpgradeFrame local WeaponFrame=script.Parent.Parent.WeaponFrame script.Parent.MouseButton1Click:connect(function() RobuxFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) MainFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) MedicineFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) ArmorFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) UpgradeFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) WeaponFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) end)
Honestly, it looks like it should work. What mode did you test it in, studio or roblox? Try adding WaitForChild's instead of what you did for variables ie:
local RobuxFrame =script.Parent.Parent:WaitForChild("RobuxFrame") local MainFrame=script.Parent.Parent:WaitForChild("MainFrame") local MedicineFrame=script.Parent.Parent:WaitForChild("MedicineFrame") local ArmorFrame=script.Parent.Parent:WaitForChild("ArmorFrame") local UpgradeFrame =script.Parent.Parent:WaitForChild("UpgradeFrame") local WeaponFrame=script.Parent.Parent:WaitForChild("WeaponFrame") script.Parent.MouseButton1Click:connect(function() RobuxFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) MainFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) MedicineFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) ArmorFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) UpgradeFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) WeaponFrame:TweenPosition(UDim2.new(0, 250, 0, 15),'Out', 'Bounce', 1.5) end)