I have a teleportation script for a titlescreen of my game. When the event happens and the function is triggered. The error was this.
Unable to cast value to Object
script.Parent.MouseButton1Down:connect(function(player) local maingameid = 483825326 local TeleportService = game:GetService("TeleportService") TeleportService:Teleport(player, maingameid) end)
Can someone help me?
Please do not downvote without telling me why.
Will accept answer if it helps