So I was trying to make a dialog choice that will teleport you to another place, so my script goes like this..
Dialog=script.Parent
Dialog.DialogChoiceSelected:connect(function(Player, Choice)
if Choice == Dialog.DialogChoice1.DialogChoice2.DialogChoice3.DialogChoice4.DialogChoice5.DialogChoice6.DialogChoice7.DialogChoice8.DialogChoice9.DialogChoice10.DialogChoice11.DialogChoice12.DialogChoice13.DialogChoice14 then
local player = game.Players:GetPlayerFromCharacter()
local placeid = 376013578
local spawn = "meme"
game.workspace.deathsound:Play()
game.Players.Player.Character.Humanoid:TakeDamage(99)
game:GetService("TeleportService"):TeleportToSpawnByName(placeid, spawn, player)
end
end)
So what's wrong with this script? In the output it's saying arguement invalid but I have no idea what that means :/

1 comment
What line is the error on? We need full details.