You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Have the raycast hit the ground from the character -
What is the issue? Include screenshots / videos if possible!
The raycast is not hitting the ground -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes, but removing the raycast params makes it work but i need the params to exclude the character body parts
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
The raycast is casted from the characters body downwards however it dosen’t work but removing the raycast params makes it work but i need the raycast params obviously to make it not hit body parts
This is a startercharactersscripts script
local char = script.Parent
local humanoidrootpart = char.PrimaryPart
local torso = char:WaitForChild("UpperTorso")
local rparams = RaycastParams.new()
rparams.FilterType = Enum.RaycastFilterType.Exclude
rparams.FilterDescendantsInstances = {char}
while task.wait(0.5) do
local rayresult = workspace:Raycast(humanoidrootpart.Position, Vector3.new(-90, 0, 0), rparams)
if rayresult then
print("hit")
end
end