hey howdy hello
I am an noob to intermediate scripter doing my best to learn the ropes by coding this system to the best of my ability, even if there is probably better ways to do it. I’m making a ledge climbing (kinda like jusaunt) system with IK because I’ve been messing around with IK and its pretty fun.
Anyway I’m gonna get stuck plenty of times so heres my first issue:
Thinking of raycasting to detect a climbable wall but it tells me it is unable to cast the dictionary to my raycast parameters. I have the dictionary because I need to be able to differentiate my arms from the wall if they get in the way. Heres the local script in startercharscripts:
local ball = game.Workspace:WaitForChild("ME")
local uis = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
Char.Archivable = true
local climbing = false
local HumPart = Char.HumanoidRootPart
local raycastParams = RaycastParams.new("LeftArm")
raycastParams.FilterDescendantsInstances = {game.Workspace.ClimbingParts:FindFirstChildWhichIsA("Part")}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
uis.InputBegan:Connect(function(input)
if (uis:GetFocusedTextBox()) then
return;
end
if input.KeyCode == Enum.KeyCode.F and climbing == false then
local cast = HumPart:Raycast(HumPart.CFrame.p, HumPart.CFrame.LookVector * 100, RaycastParams)
if cast then
print(cast)
Char:WaitForChild("HumanoidRootPart").Anchored = true
climbing = true
print(climbing)
end
elseif input.KeyCode == Enum.KeyCode.F and climbing == true then
Char:WaitForChild("HumanoidRootPart").Anchored = false
climbing = false
print(climbing)
end
end)
Now if you can think of a better way to do this then be my guest, but I probably am going to learn more if I do it the way I specify so just work with me here.
THANKS,
DEV