Hello! I am trying to make a visual coldown system where a frame gets tweened from a size covering the whole frame, to a size that isn’t visible.
…–…-
…—…-
However I can’t seem to able to modify the size. Here is the code I am using.
UserInputService.InputBegan:Connect(function(input, isProcessed)
if isProcessed then return end
if input.KeyCode == Enum.KeyCode.F then
ui.Frame.Size = UDim2.new(1, 0, 1, 0)
ui.Frame.Position = UDim2.new(0, 0,-0, 0)
print("F key pressed")
playRandomPunch()
end
end)
You can see that the size says it changes in the properties, but in reality it doesn’t change at all. Why is this happening and how can I fix this?
Any help is apreciated!