I have made a game and whenever you click the ring, the quest should change, but nothing happened but the ring got destroyed (which means the script isn't wrong). Is it just a bug or did I do something wrong?
script:
1 | script.Parent.MouseClick:Connect( function (click) |
2 | game.StarterGui.ScreenGui.Frame.QuestInfo.Text = "return the ring" |
3 | script.Parent.Parent.Parent:Destroy() |
4 |
5 | end ) |
Hi. In the line ' game.StarterGui.ScreenGui.Frame.QuestInfo.Text = "return the ring" ', the QuestInfo belongs to the StarterGui, not the player's gui, you should do this instead:
1 | script.Parent.MouseClick:Connect( function (Player) -- It's the player that clicked |
2 | Player.PlayerGui.ScreenGui.Frame.QuestInfo.Text = "return the ring" |
3 | script.Parent.Parent.Parent:Destroy() |
4 | end ) |