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

What's wrong with this script?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

There's two things you should know:

This script is called, IntroGui and it's in Workspace. The IntroGui itself is in StarterGui, when I tried too run it, it said the first line had a mistake, what's the problem?

local Intro = script.Intro:Clone()
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:wait()
    Intro:Clone().Parent = player.PlayerGui
end)
0
If the answer helped, you should mark it as accepted so other people know the problem is solved BlueTaslem 18071 — 9y

2 answers

Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

You said the IntroGui is in the StarterGui, so why are you using script.Intro to refer to it?

local Intro = game.StarterGui.IntroGui:Clone()

But, if it's in the StarterGui, then every new player (and upon every death) will have it anyway. You should really put it in one of the Storage services.

Ad
Log in to vote
-1
Answered by 9 years ago

The problem is the script is that near the end you added this ")", and you need the delete that.

Answer this question