What do i want to achieve? I want to do a round system with countries flags that select a random country
What is the issue? I did a script with tweening the canvas position of the scrollingframe (i know it is not the best way, but i’m really bad at scripting xD). The problem is that the canvas position of mobile and the canvas position of pc are different! How can i make sure that the canvas position of pc and the mobile one are the same?
This is my script of the round system and the tween if you are interested
local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status")
local function toMS(s)
return string.format("%02i:%02i", s/60%60, s%60)
end
while true do
--Intermission
for i = 10, 0, -1 do
Status.Value = "Intermission: ".. i
task.wait(1)
end
local randomnumber = math.random(1, 1)
if randomnumber == 1 then
local UserInputService = game:GetService("UserInputService")
script.Parent.Parent.Visible = true
local tweenservice = game:GetService("TweenService")
local twinfo = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0
)
local tween = tweenservice:Create(script.Parent, twinfo, {CanvasPosition = Vector2.new(200, 0)})
tween:Play()
task.wait(twinfo.Time + 1)
Status.Value = "Italy Chosen"
wait(3)
script.Parent.Parent.Visible = false
script.Parent.CanvasPosition = Vector2.new(0, 0)
task.wait(3)
--tp map
for i = 10, 0, -1 do
Status.Value = "Game: "..toMS(i)
task.wait(1)
end
--Teleport to Lobby
end
end
Thanks very much for help, all answers are welcome