script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent:TweenPosition(UDim2.new(-1, 0,0.258, 0))
wait(1)
script.Parent.Parent.Visible = false
local Quest = script.Parent.Parent.Parent.Quest
Quest.Visible = true
or wait(1)
script.Parent.Parent.Visible = false
local Quest1 = script.Parent.Parent.Parent.Quest
Quest1.Visible = true
end)
✓ ANSWER ACCEPTED
I'm trying to make the local script randomly choose between 2 Frames but somehow it doesnt work?
1 answer
✓ Accepted answer
local Quest = script.Parent.Parent.Parent.Quest
local Quest1 = script.Parent.Parent.Parent.Quest
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent:TweenPosition(UDim2.new(-1,0,0.258,0))
choices = math.random(1,2)
if choices == 1 then Quest.Visible = true
elseif choices == 2 then Quest1.Visible = true
end)
Please, do let me know if this does not work! I have not scripted on ROBLOX since February 2019 and I really need to know what I still do and don't know!
2 comments
0
Well no it did not work and only gave me an error which said: Players.Simpletton.PlayerGui.Quest.Frame.TextButton.LocalScript:9: unexpected symbol near ')'
0
Sorry, looks like I've lost alot since my last time :/
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I would consider removing the random "or" you have on line 7.