By the way, I almost don't know anything about coding because I am a beginner and just watch tutorials :D
Ok so, the code I have in ServerScriptService is a normal script
local dialogue = game.ReplicatedStorage.Dialogue
local type = Enum.ThumbnailType.HeadShot
local size = Enum.ThumbnailSize.Size180x180
function Message (player, speech, id)
dialogue:FireAllClients(player, speech, id)
end
wait()
local players = game.Players:GetChildren()
local player = players[math.random(1, #players)]
local id = game.Players:GetUserThumbnailAsync(player.UserId, type, size)
wait(1)
Message(player, "Hello and welcome to my life story!", id)
wait(3.5)
Message(player, "In this story I'll be telling you about my life :D", id)
wait(5)
Message(player, "Let's get started..", id)
wait(2)
Message(player, "To proceed, please walk on the block in-front of you", id)
game.Workspace.TeleportPart.Transparency = 0
game.StarterGui.ScreenGui.Frame.Visible = false
part = game.Workspace.TeleportPart
local debounce = false
part.Touched:Connect(function(Touched)
print("Touched")
wait(1)
Message(player, "Please walk inside the house in front of you ('my' house)", id)
end)
The messaging part works on Roblox Studio but not in the actual game. And when I click F9 in the actual game and click server it says:
09:28:37 -- ServerScriptService.Script:10: bad argument #2 (interval is empty) Stack Begin Script 'ServerScriptService.Script', line 10 Stack End
Reply to answer:
As I said, I am a noob so would I put -
local dialogue = game.ReplicatedStorage.Dialogue
local type = Enum.ThumbnailType.HeadShot
local size = Enum.ThumbnailSize.Size180x180
function Message (player, speech, id)
dialogue:FireAllClients(player, speech, id)
end
local numOfPlayers = 0
local minimumPlayers = 1
repeat
game.Players.PlayerAdded:Wait()
numOfPlayers = #game.Players:GetPlayers()
until numOfPlayers >= minimumPlayers
local players = game.Players:GetPlayers()
local player = players[math.random(1, #players)]
local id = game.Players:GetUserThumbnailAsync(player.UserId, type, size)
wait(1)
Message(player, "Hello and welcome to my life story!", id)
wait(3.5)
Message(player, "In this story I'll be telling you about my life :D", id)
wait(5)
Message(player, "Let's get started..", id)
wait(2)
Message(player, "To proceed, please walk on the block in-front of you", id)
game.Workspace.TeleportPart.Transparency = 0
game.StarterGui.ScreenGui.Frame.Visible = false
part = game.Workspace.TeleportPart
local debounce = false
part.Touched:Connect(function(Touched)
print("Touched")
wait(1)
Message(player, "Please walk inside the house in front of you ('my' house)", id)
end)

4 comments
As I have said I am a noob so I have edited my question, can you please read my reply to your answer Ziannea :D
yes
Thank you but it still doesn't work. It's not working in Roblox Studio either :\
Nevermind it does work, I accidentally put a piece of code you told me in the wrong spot. Thank you so much!