Hello I have a script that was working fine and now is not and I am puzzled. This is probably due to me being a newbie and all.
The tweens inside here, none of them work and recently they all did work just fine. I moved the frame around on screen and now suddenly they do not.
local starterGui = game.StarterGui
local frame = starterGui.PotionGui.PotionPopUp:FindFirstChild("Frame")
local isOpen = starterGui.PotionGui:FindFirstChild("isOpen")
print("starterGui is " .. tostring(starterGui))
print("frame is " .. tostring(frame))
script.Parent.MouseButton1Click:connect(function()
if isOpen.Value == true then
isOpen.Value = false
print ("mousclick set isOpen to " .. tostring(isOpen.Value))
else
isOpen.Value = true
print ("mousclick set isOpen to " .. tostring(isOpen.Value))
end
end)
isOpen.Changed:Connect(function(newValue)
if newValue == false then
--close the frame
frame:TweenPosition(UDim2.new(0.5, 0,0.469, 0), 'Out', 'Quad', 1)
isOpen.Value = false
print "tween fired and isOpen set to false"
print (frame.Position)
else
--open the frame
frame:TweenPosition(UDim2.new(0.5, 0,0.469, 0), 'Out', 'Quad', 1)
isOpen.Value = true
print "tween fired and isOpen set to true - it should now be open"
print (frame.Position)
end
end)
frame:TweenPosition(UDim2.new(1, 0,0.469, 0), 'Out', 'Sine', .5)
I added all those prints to verify things, and the script logic seems to be fine. This tween animation did work but I moved the frame around on the screen and now it doesnt.
here are some supporting images to show settings and output.
thanks for all of your help so far!