Hi everyone, i’ve tried to use AI for a script that has a UI frame transition (appears from nowhere smoothly) when touching part
Heres the script:
local block = workspace:WaitForChild("Part")
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local frame1 = Instance.new("Frame")
frame1.Size = UDim2.new(0, 200, 0, 100)
frame1.Position = UDim2.new(0.5, -100, 0.5, -50)
frame1.BackgroundColor3 = Color3.new(1, 1, 1)
frame1.Parent = screenGui
local frame2 = Instance.new("Frame")
frame2.Size = UDim2.new(0, 200, 0, 100)
frame2.Position = UDim2.new(1, 0, 0, 0)
frame2.BackgroundColor3 = Color3.new(0, 1, 0)
frame2.Parent = screenGui
local function TransitionToScreen2()
frame1:TweenPosition(UDim2.new(-1, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 1, true)
frame2:TweenPosition(UDim2.new(0.5, -100, 0.5, -50), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 1, true)
end
local function OnBlockTouched()
TransitionToScreen2()
end
block.Touched:Connect(OnBlockTouched)
I had to remove documentations cuz they were in Russian.
Heres the video of issue:
Can someone help me so it will work?
Help/Feedback would be appreciated.
P.S: some parts of script i had to change cuz they didn’t work
I used AI because i almost dont know how to script (i know only 30%)