You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want the local script to run -
What is the issue? Include screenshots / videos if possible!
my local script is not working and it is not warning me the warn statement -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i did look for solutions in the dev hub, they told me not to put local scripts in the workspace or any of its children and maybe my script was not enabled but it is enabled.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local c1, c2, c3 = script.Parent.choice1, script.Parent.choice2, script.Parent.choice3
local sg = game:GetService("StarterGui")
local ts = game:GetService("TweenService")
local wa = sg.wrongAnswersGUI.q1
local tweenFadeOn = ts:Create(wa, TweenInfo.new(1), {TextTransparency = 0})
local tweenFadeOff = ts:Create(wa, TweenInfo.new(1), {TextTransparency = 1})
for i = 1, 10 do
warn("Script is running")
end
local function quickConfigure(object, value)
object.Visible = value
object.Active = value
end
c1.MouseButton1Click:Connect(function()
print("Player selected the correct answer! (0)")
quickConfigure(c1, false)
game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Correct Answers").Value += 1
c1.Parent.Parent.Parent.Transparency = .5
c1.Parent.Parent.Parent.CanCollide = false
end)
c2.MouseButton1Click:Connect(function()
warn("Player selected the wrong answer! (1)")
wa.Text = "Containers do not store food and only stores waste materials since food can spoil and decay over time which can produce smells that attracts flies and etc."
quickConfigure(c2, false)
tweenFadeOn:Play()
tweenFadeOn.Completed:Wait()
tweenFadeOff:Play()
tweenFadeOff.Completed:Wait()
quickConfigure(c2, true)
end)
c3.MouseButton1Click:Connect(function()
warn("Player selected the wrong answer! (2)")
wa.Text = "Containers do not store clothes and only stores waste materials since clothes are not waste materials because it can be reused donated or recycled. Additionally, clothes can take up more space in the disposal if its not properly folded. And it can be stored using laundry hampers/hangers or closets/cabinets."
quickConfigure(c3, false)
tweenFadeOn:Play()
tweenFadeOn.Completed:Wait()
tweenFadeOff:Play()
tweenFadeOff.Completed:Wait()
quickConfigure(c3, true)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.