How Can I Force A Tool To Be Held In The Players Hand For A Certain Amount Of Time
edit: i will be afk for a min because i got to do something
2 Likes
Can you show me the script? I will need the script to even try to answer this
1 Like
You could probably use this, then check when the Character attempts to unequip the Tool to call it again perhaps?
https://developer.roblox.com/en-us/api-reference/function/Humanoid/EquipTool
local DurationOfTime = 20
local Tool = script.Parent
local Character
local Connection
local function ForceTool()
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
Humanoid:EquipTool(Tool)
end
end
local function SetCharacter()
Character = Tool.Parent
end
Tool.Equipped:Connect(SetCharacter)
Connection = Tool.Unequipped:Connect(ForceTool)
wait(DurationOfTime)
Connection:Disconnect()
This is a unique idea to say the very least
2 Likes
Well that’s probably a dif script parenting the tool
Try adding a wait() before calling EquipTool?
is their a way to print out a statement if two variables are true?
What-
local Var1 = false
local Var2 = true
print(Var1 == Var2) --Outputs back false
1 Like
no not like that sorry if i sound dumb lol,
just nevermind