Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I'm trying to make the local script randomly choose between 2 Frames but somehow it doesnt work?

Asked by 5 years ago
01script.Parent.MouseButton1Click:Connect(function()
02    script.Parent.Parent:TweenPosition(UDim2.new(-1, 0,0.258, 0))
03    wait(1)
04    script.Parent.Parent.Visible = false
05    local Quest = script.Parent.Parent.Parent.Quest
06    Quest.Visible = true
07    or wait(1)
08    script.Parent.Parent.Visible = false
09    local Quest1 = script.Parent.Parent.Parent.Quest
10    Quest1.Visible = true
11 
12 
13end)
0
I would consider removing the random "or" you have on line 7. Unhumanly 152 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
1local Quest = script.Parent.Parent.Parent.Quest
2local Quest1 = script.Parent.Parent.Parent.Quest
3script.Parent.MouseButton1Click:Connect(function()
4script.Parent.Parent:TweenPosition(UDim2.new(-1,0,0.258,0))
5choices = math.random(1,2)
6if choices == 1 then Quest.Visible = true
7elseif choices == 2 then Quest1.Visible = true
8 
9end)

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!

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 ')' Simpletton 82 — 5y
0
Sorry, looks like I've lost alot since my last time :/ Sk3pticalR0BL0X 33 — 5y
Ad

Answer this question