
672 Views
264 Executions
Stand on players head with out collision
Universal Script 📌
ScriptDAILYPublished 5
9 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Allows you to float on players head without collision.
local RunService = game:GetService("RunService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Root = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")
-- Settings
local RAY_LENGTH = 3.5 -- How far down to look for a player
local BOUNCE_FORCE = 5 -- Small upward force to stay on top
RunService.Heartbeat:Connect(function()
-- Only run if we are actually in the air/falling
if Humanoid:GetState() == Enum.HumanoidStateType.Freefall or Humanoid:GetState() == Enum.HumanoidStateType.Jumping then
-- Setup Raycast
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {Character}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
-- Cast downwards
local raycastResult = workspace:Raycast(Root.Position, Vector3.new(0, -RAY_LENGTH, 0), raycastParams)
if raycastResult and raycastResult.Instance then
local hitModel = raycastResult.Instance:FindFirstAncestorOfClass("Model")
-- Check if the hit object is a player
if hitModel and hitModel:FindFirstChild("Humanoid") then
-- Stop falling through them by resetting Y velocity
Root.AssemblyLinearVelocity = Vector3.new(Root.AssemblyLinearVelocity.X, BOUNCE_FORCE, Root.AssemblyLinearVelocity.Z)
-- Optional: Change state to Landed to allow another jump immediately
Humanoid:ChangeState(Enum.HumanoidStateType.Landed)
end
end
end
end)









Holy ChatGPT is getting better at coding dang
@rocketscript No it was Gemini