local Spawns = game.Workspace.Spawns:GetChildren()
local player = script.Parent.Parent.Parent.Parent
local TeleportPart = game.Workspace.Cartps.CarTP1
script.Parent.Parent.Parent.Parent.MouseButton1Click:Connect(function()
player.Character.Humanoid.Sit = false
wait(0.4)
player.PlayerGui.ExitGui:Destroy()
player.Character.HumanoidRootPart.CFrame = Spawns[math.random(1,9)].CFrame
player.Character.Humanoid.JumpPower = 50
player.Character.Humanoid.WalkSpeed = 16
end)
I have the script above, I would like to make it work seeing as I get an error due to an old friends error, I no longer have contacts with. The error I get may be quite obvious but I will still post it.
MouseButton1Click is not a valid member of DataModel "Creepy :) @ 24 Nov 2021 21:28"

1 comment
script.Parent.Parent.Parent.Parent is referring to the game object, whose class is DataModel. Your error is basically saying MouseButton1Click isn't a function of the game. You'll have to provide more info in order for us to provide a valid answer, though.