function check(Player,DialogChoice,Kick)
if DialogChoice.Name == "???" then
wait(5)
Player:Kick("???")
end
end
script.Parent.DialogChoiceSelected:connect(check)
teleport script
function check(Player,DialogChoice)
if DialogChoice.Name == "!!!" then
game:GetService("TeleportService"):Teleport(12437769063,Player)
end
end
script.Parent.DialogChoiceSelected:connect(check)
--teleport
DialogChoice = workspace["Horror Movie Reject "].Dialog["!!!"]
Player = game:GetService("Players").LocalPlayer
if DialogChoice.Name == "!!!" then
game:GetService("TeleportService"):Teleport(12437769063,Player)
end
--kick
DialogChoice = workspace["Horror Movie Reject "].Dialog["???"]
Player = game:GetService("Players").LocalPlayer
if DialogChoice.Name == "???" then
wait(5)
Player:Kick("???")
end
Local scripts only run when they are in one of these places:
PlayerGui
ReplicatedFirst
Tools
Characters
Server scripts run in:
Workspace
ServerScriptService
PlayerGui
Extra: Module scripts run when a script calls require() on it. The function returns what the module returns when it runs.
This is as far as I can remember, there are probably a few more places for each.
To fix the problem, you need this local script to be in a valid location, such as the character. It can be automatically placed in the character if you put the script in StarterPlayer.StarterCharacterScripts. If you do this, you also have to keep in mind that the local script will rerun when the player is respawned.
You can also put it in StarterGui so it goes in PlayerGui, but it will also be rerun when the player is respawned, unless placed in a ScreenGui with ResetOnSpawn set to false. This is what I recommend doing, because you most likely have UI in your game.
After relocating the script, you need to adjust the code so it can work again.
hell no roblox scripting is so bad i dont want to spend more 5 hours to make something simple like teleport to other game, i hate when there is no errors in output i dont know what to do