Greetings, i am making a game similar to cube cavern, "Blockie Cavern". I can't make the intro play due to the fact it doesn't error and/or doesn't work. If you can help, submit an answer below. Ill be sure to accept and give an upvote for it. I didn't use scriptservice because it is in the scriptservice.
( for some non user data and user data )
--The Server Script (used to add a folder for a players data and intro)
local rs = game:GetService("ReplicatedStorage")
local remotes = rs.Objects.RemoteEvents
local remotedused = remotes.AddGui
game.Players.PlayerAdded:Connect(function(client)
---
local plrvalue = Instance.new("Folder",game:GetService("ReplicatedStorage").Players)
---
plrvalue.Name = client.Name
---
local rs = game:GetService("ReplicatedStorage")
---
rs.Objects.Startup.Audio:Clone().Parent = game.Players[client.Name].PlayerGui
---
local plrgui = game.Players[client.Name].PlayerGui
remotedused:FireClient(client,"GuiAdd")
end)
game.Players.PlayerRemoving:Connect(function(plr)
game:GetService("ReplicatedStorage").Players[plr.Name]:Destroy()
print("Thank you for playing, come back soon!")
end)
--Intro Script
local rs = game:GetService("ReplicatedStorage")
local remotes = rs.Objects.RemoteEvents
local remotedused = remotes.AddGui
script.Parent.AddGui.OnClientEvent:Connect(function(guiadd)
if guiadd == "GuiAdd" then
script.Parent.Intro:Clone().Parent = game.Players.LocalPlayer.PlayerGui
end
end)
--[[ Ignore this, it's just for stuff i need to use for later.
plrgui:WaitForChild("Audio")
---
plrgui.Audio.title:Play()
wait(2)
plrgui:FindFirstChild("Intro")
wait(.5)
plrgui.Intro.B1.Visible = true
wait(2)
plrgui.Intro.B2.Visible = true
wait(1.5)
plrgui.Intro.ImageLabel.Visible = true
plrgui.Intro.TextButton.Visible = true
wait(110)
plrgui.Intro:Destroy()
--]]

1 comment
Your code will have two objects named the same inside of Players. Just name the folder 'Data' and parent to the folder.