From 993276d2ed0ae9421ef52aee96dd90ce4f1f2640 Mon Sep 17 00:00:00 2001 From: CloneTrooper1019 Date: Sat, 16 Nov 2019 15:59:14 -0600 Subject: [PATCH] Patched tools getting stuck in SFoTH IV. --- Player/ToolStuckPatch.server.lua | 17 +++++++++++++++++ default.project.json | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Player/ToolStuckPatch.server.lua diff --git a/Player/ToolStuckPatch.server.lua b/Player/ToolStuckPatch.server.lua new file mode 100644 index 0000000..fabf9a3 --- /dev/null +++ b/Player/ToolStuckPatch.server.lua @@ -0,0 +1,17 @@ +local character = script.Parent + +local function onChildAdded(child) + if child:IsA("Tool") and child.RequiresHandle then + local handle = child:FindFirstChild("Handle") + + if handle and handle:IsGrounded() then + workspace:UnjoinFromOutsiders{character} + end + end +end + +for _,child in pairs(character:GetChildren()) do + onChildAdded(child) +end + +character.ChildAdded:Connect(onChildAdded) \ No newline at end of file diff --git a/default.project.json b/default.project.json index 11a680d..dba45c9 100644 --- a/default.project.json +++ b/default.project.json @@ -22,12 +22,16 @@ "ReplicatedStorage": { + "$ignoreUnknownInstances": true, + "$className": "ReplicatedStorage", "$path": "Shared" }, "ServerStorage": { + "$ignoreUnknownInstances": true, + "$className": "ServerStorage", "$path": "Server/Resources", @@ -54,6 +58,7 @@ "ServerScriptService": { + "$ignoreUnknownInstances": true, "$className": "ServerScriptService", "$path": "Server/Scripts" }, @@ -64,7 +69,6 @@ "$properties": { - "DevComputerMovementMode": "KeyboardMouse", "DevTouchCameraMovementMode": "Classic", "LoadCharacterAppearance": false, @@ -73,12 +77,14 @@ "StarterCharacterScripts": { + "$ignoreUnknownInstances": true, "$className": "StarterCharacterScripts", "$path": "Player" }, "StarterPlayerScripts": { + "$ignoreUnknownInstances": true, "$className": "StarterPlayerScripts", "$path": "Client" }