Hello, I’m trying to make a dead eye system similar to the one in rdr2 because im bored, but I tried to make the tagging system, and it works somewhat how i want it, except the areas where you tag just fall, ill add some gyazo gifs of what i want it to do vs what it actually is doing, the code is real simple because im too lazy to make it complicated
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local tag = game.ReplicatedStorage:WaitForChild("tag")
script.Parent.Activated:Connect(function()
print('uwu')
local hit = mouse.Target
print(hit)
if mouse.Target.Parent:FindFirstChild("Humanoid") then
print('humanoid')
local humanoid = mouse.Target.Parent.Humanoid
local cframe = mouse.Hit
local weld = Instance.new("WeldConstraint")
local clone = tag:Clone()
print(cframe)
clone.Parent = workspace.LocalTags
clone.CFrame = cframe
clone.Hit.Value = mouse.Target
print(clone.Hit.Value)
weld.Part0 = mouse.Target
weld.Part1 = clone
weld.Parent = clone
end
end)
Yes you can weld it to player’s primary part(HumanoidRootPart), though i would advice setting the density to 0 before doing this because if you don’t have less density it may affect player movement.
there is an option called custom physical properties under every basepart and meshpart, and under custom physical properties you have an option called Density.
Though changing the density won’t have much effect i would advice you to lower it.
sorry i had to sleep last night, ill lower it and see what happens rn then just edit this message with the results
edit: ok so i looked into the properties tab and didnt find anything like that, and i tried printing it through the command bar to see if its just invis like cframe, and it errored
Density is not a valid member of Part "ReplicatedStorage.tag"
and yea its a basepart its just a part with a billboard on it
literally i dont know what i did but all i did was change mouse.Target to hit cuz i had a variable for it and all of a sudden the welds are working lol, sorry for posting this i have no idea why it wasnt working last night
Oh it’s an property which you must enable to activate.
You will find an option called CustomPhysicalProperties under the part, if you turn that on, you’ll be able to see options like density elasticity etc.