Okay so hopefully my question makes sense, but I'll explain it. What I have tried, yet failed to do is clone a model from the workspace, and set the position to directly under the player, but if a player jumps for example, the model just clones to under their feet, but in the air, however I want it to be flat on whatever part is underneath them. In addition, if the player is walking then the model gets cloned behind them too, which is something I can't seem to fix, so if I could have assistance with that too then I'd really appreciate it.
local rs = game:GetService("ReplicatedStorage") local CAS = game:GetService("ContextActionService") local trap = rs:WaitForChild("BearTrap") local event = rs.Events:WaitForChild("placeBT") local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait() local inGame = plr:WaitForChild("inGame") local traps = plr:WaitForChild("Traps") local function placeTrap(actionName, inputState, inputObj) if inputState == Enum.UserInputState.Begin and traps.Value >= 1 then event:FireServer(plr.Traps) rs.BearTrap.CreatedBy.Value = plr.Name trap:Clone().Parent = workspace local pos = char["LeftFoot"].Position trap:SetPrimaryPartCFrame(CFrame.new(pos)) else return end end CAS:BindAction("Trap Placement", placeTrap, false, Enum.KeyCode.F)
I appreciate you reading this, and any assistance is welcome and appreciated!