Hello guys, so I’ve been trying to make this key tool to stop flinging every time you step on it and stay on the ground anchored to where the tool would still work normally after picking it up ever since yesterday. Very similar to how horror games “The Mimic” and “Evelyn” have their tools anchored somewhere and you can still pick it up without worrying about freezing with the tool.
How my tool is acting right now.
How I want it to act.
Anyone know what I’m doing wrong and how to make it work? I’m not so experienced in scripting as I’ve mentioned in the past on here.
Ok where did that Key go it literally just yeeted itself out of existence
Are you sure that there isn’t another script that’s messing with its “Anchored” property? Cause your Script looks fine to me, unless if it could be the destroytouchinterest script? Highly doubt so though
Nope, this is what the destroytouchinterest script looks like
I just want my tool to be anchored and still work properly after I clicked on it to pick it up, how would I be able to do that going off of the information I provided?
This is what a guy told me last yesterday and it did fix the flinging the key problem but then it brought me back to the let me get infinite keys at the same time problem that I had. Maybe this can help you understand a bit better?
Only thing I can think of, is duplicating the Handle as a Part itself, and putting the Tool inside ServerStorage (Both should be separate from each other)
--This should just be the handle only
local Handle = script.Parent
local Tool = game.ServerStorage:WaitForChild("Key")
local function Click(Player)
local isKeyAlreadyGiven = Player.Backpack:FindFirstChild(Tool.Name) or Player.Character:FindFirstChild(Tool.Name)
if not isKeyAlreadyGiven then
local Clone = Tool:Clone()
Clone.Parent = Player.Backpack
end
end
Handle.ClickDetector.MouseClick:Connect(Click)
Make the tool act as a button, like a part that contains a ClickDetector along with a script, that’s it.
Then, you tell the script that whenever someone triggered the detector, clone the part and insert a new tool and adjust some of its properties and parent the part named Handle to the tool.