The title says it all. There is a problem with my tweenposition function and I don’t know how.
It’s supposed to run when a remote event is fired! I even tried using print debugging. Here’s the code I have:
local Frame1 = script.Parent.Frame1
local Frame2 = script.Parent.Frame2
local RmtEvent = game.ReplicatedStorage.RemoteEvents.Cutscenes.CutsceneStart
local RmtEvent2 = game.ReplicatedStorage.RemoteEvents.Cutscenes.CutsceneEnd
function Check()
if Frame1.Position == UDim2.new(0, 0, 0, 0) and Frame2.Position == UDim2.new(0, 0, 0.857, 0)then
print("Gud")
else
print("Sorry Dude! :C")
end
end
RmtEvent.OnClientEvent:Connect(function()
Frame1:TweenPosition(UDim2.new(0, 0, 0, 0))
Frame2:TweenPosition(UDim2.new(0, 0, 0.857, 0))
Check()
end)
RmtEvent.OnClientEvent:Connect(function()
Frame1:TweenPosition(UDim2.new(0, 0, -0.2, 0))
Frame2:TweenPosition(UDim2.new(0, 0, 1.2, 0))
end)