Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I have a gui that when pressed, finishes my intro, but its doesn't work?

I have this script that when you click, depending if you’ve done the intro or not, it should either go threw, or allow you to make a character. But when you do so, the players “DoneTest” value, doesn’t go to one as it should, it goes to 1 on that players screen only, any help? Heres part of the script.

PlayButton.MouseButton1Click:Connect(function()

if Player.leaderstats.DoneTest.Value == 1 then

script.Parent.ImageLabel.ImageTransparency = 1

script.Parent.ImageLabel.Visible = false

script.Parent.ImageLabel.Active = false

game.Lighting.Blur.Size = 15

wait ()

game.Lighting.Blur.Size = 12

wait ()

game.Lighting.Blur.Size = 9

wait ()

game.Lighting.Blur.Size = 6

wait ()

game.Lighting.Blur.Size = 5.5

wait ()

game.Lighting.Blur.Size = 5

script.Soundsx:Stop()

PlayButton:Destroy()

Camera.CameraType = Enum.CameraType.Custom

elseif Player.leaderstats.DoneTest.Value == 0 then

script.Parent.ImageLabel.ImageTransparency = 1

script.Parent.ImageLabel.Visible = false

script.Parent.ImageLabel.Active = false

game.Lighting.Blur.Size = 15

wait ()

game.Lighting.Blur.Size = 12

wait ()

game.Lighting.Blur.Size = 9

wait ()

game.Lighting.Blur.Size = 6

wait ()

game.Lighting.Blur.Size = 5.5

wait ()

game.Lighting.Blur.Size = 5

script.Soundsx:Stop()

script.SoundCreation:Play()

PlayButton:Destroy()

Camera.CFrame = game.workspace.CustomPart.CFrame

script.Parent.Hats.Visible = true

script.Parent.Hats.PLAY.MouseButton1Click:Connect(function()

script.SoundCreation:Stop()

Player.leaderstats.DoneTest.Value = 1

script.Parent.Hats:Destroy()

Camera.CameraType = Enum.CameraType.Custom

end)

end

end)

2 comments

0

Um You cant just say player.Leaderstats

0

Then what am I supposed to do.

1 answer

replace "Player.leaderstats.DoneTest.Value = 1" with "game.ReplicatedStorage.DoneTest1:FireServer()"

-- & put a Script in ServerScriptService/Workspace: local re=Instance.new("RemoteEvent",game.ReplicatedStorage) re.Name="DoneTest1"

re.OnServerEvent:Connect(function(Player)

Player.leaderstats.DoneTest.Value = 1

end)

1 comment

0

Alright let me test this, if it works, ill accept ur answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.