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

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

Asked by 5 years ago

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)
0
Um You cant just say player.Leaderstats voidofdeathfire 148 — 5y
0
Then what am I supposed to do. Pooglies 7 — 5y

1 answer

Log in to vote
-1
Answered by 5 years ago

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)

0
Alright let me test this, if it works, ill accept ur answer. Pooglies 7 — 5y
Ad

Answer this question