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!
I would like to make it so that a (non-colliding) part attached to the foot is always hovering on the top of whatever part the foot is touching. I am attempting to create an IK footing system and need to know where to put the foot.
-
What is the issue? Include screenshots / videos if possible!
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried using a prismatic constraint with cancollide on connected to the foot and the blue ball and have tried using part.Touched(function(hit) to make the blue ball go to the top of whatever it is touching, yet I haven’t found success.
local RS = game:GetService("RunService")
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local inplantposL = Instance.new("Part")
inplantposL.Name = "inplantposL"
inplantposL.Parent = char.LeftFoot
inplantposL.Shape = Enum.PartType.Ball
inplantposL.Size = Vector3.new(2,2,2)
inplantposL.Color = Color3.new(0, 0, 1)
inplantposL.CanCollide = false
inplantposL.Transparency = 0.5
RS.RenderStepped:Connect(function()
inplantposL.Position = char.LeftFoot.Position + Vector3.new(0, char.LeftFoot.Size.Y / -2, 0)
end)
How can I get that blue orb to be on top of a part, lets say the spawn point for that example.
I AM aware that it probably has something to do with changing the Y value of the position in the RenderStepped function, I am just not sure how to get the position the blue ball needs to be at.
Just for clarification, I am looking for a general solution, notfor an entire script or anything.