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"
On line "05" replace it with this:
player.Parent.MouseClick:Connect(function()
Although I would recommend, using it in this way as I always do it like this:
function Clicked() 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 player.Parent.MouseClick:Connect(Clicked)
I wish I helped!