TZH on Nostr: local Players = game:GetService("Players") local Character = script.Parent local ...
local Players = game:GetService("Players")
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local Mount = Character:WaitForChild("Mount")
local mounting = false
function mountCharacter(player)
if mounting then
return
end
mounting = true
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local torso = character:WaitForChild("HumanoidRootPart")
local humanoidMount = humanoid:LoadAnimation(Mount)
humanoidMount:Play()
humanoid.AutoRotate = false
torso.CFrame = Mount.CFrame * CFrame.new(0, 0, -1.5) * CFrame.Angles(math.rad(90), 0, 0)
humanoid.Sit = true
end
Humanoid.Died:Connect(function()
mounting = false
end)
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:lower() == "mount" then
mountCharacter(player)
end
end)
end)
Published at
2023-02-13 19:36:12Event JSON
{
"id": "402fb1c6852b655b0acba51d4ededd8bc67e44f06c5774d7f5307b5288068ac1",
"pubkey": "cc7a67745452c600257b3214c78d559d5ef671a9b274827c4bd9ebd7538b8f51",
"created_at": 1676316972,
"kind": 1,
"tags": [],
"content": "local Players = game:GetService(\"Players\")\nlocal Character = script.Parent\nlocal Humanoid = Character:WaitForChild(\"Humanoid\")\nlocal Mount = Character:WaitForChild(\"Mount\")\nlocal mounting = false\n\nfunction mountCharacter(player)\n if mounting then\n return\n end\n mounting = true\n local character = player.Character or player.CharacterAdded:Wait()\n local humanoid = character:WaitForChild(\"Humanoid\")\n local torso = character:WaitForChild(\"HumanoidRootPart\")\n local humanoidMount = humanoid:LoadAnimation(Mount)\n humanoidMount:Play()\n humanoid.AutoRotate = false\n torso.CFrame = Mount.CFrame * CFrame.new(0, 0, -1.5) * CFrame.Angles(math.rad(90), 0, 0)\n humanoid.Sit = true\nend\n\nHumanoid.Died:Connect(function()\n mounting = false\nend)\n\nPlayers.PlayerAdded:Connect(function(player)\n player.Chatted:Connect(function(message)\n if message:lower() == \"mount\" then\n mountCharacter(player)\n end\n end)\nend)",
"sig": "761a7fdaf08d8adb92eea185300e7ccf2688708e51ea3f4615d509dcd18ab268e944141dde5f7a444d1ba9c3f730a6d822be95624800f44364760ab5b973779f"
}