clean up code and remove unnessisary imports

This commit is contained in:
Reid 2023-08-11 17:44:27 -07:00
parent 8232eacff2
commit b84a3b22dc
2 changed files with 4 additions and 7 deletions

View file

@ -25,11 +25,9 @@ const slot: Hooks.FC<slotProps> = (props, hooks) => {
const { world, clientState } = useWorldContext(hooks) const { world, clientState } = useWorldContext(hooks)
const handleActivated = () => { const handleActivated = () => {
if (tool.Parent !== clientState.character) { tool.Parent !== clientState.character
clientState.character.Humanoid.EquipTool(tool) ? clientState.character.Humanoid.EquipTool(tool)
} else { : clientState.character.Humanoid.UnequipTools()
clientState.character.Humanoid.UnequipTools()
}
} }
// maybe opt this into our system for inputs? // maybe opt this into our system for inputs?

View file

@ -1,7 +1,6 @@
import Roact from "@rbxts/roact" import Roact from "@rbxts/roact"
import Hooks from "@rbxts/roact-hooks" import Hooks from "@rbxts/roact-hooks"
import Hotbar from "./hotbar/hotbar" import Hotbar from "./hotbar/hotbar"
import { Players } from "@rbxts/services"
interface mainProps extends Roact.JsxInstanceEvents<ScreenGui> { interface mainProps extends Roact.JsxInstanceEvents<ScreenGui> {
Event?: Roact.JsxInstanceEvents<ScreenGui> Event?: Roact.JsxInstanceEvents<ScreenGui>
@ -15,7 +14,7 @@ const main: Hooks.FC<mainProps> = (props, hooks) => {
const spreadableProps = { ...props } as Partial<mainProps> const spreadableProps = { ...props } as Partial<mainProps>
return ( return (
<screengui ResetOnSpawn={false} IgnoreGuiInset {...spreadableProps}> <screengui ResetOnSpawn={true} IgnoreGuiInset {...spreadableProps}>
<Hotbar <Hotbar
Position={new UDim2(0.5, 0, 1, 0)} Position={new UDim2(0.5, 0, 1, 0)}
AnchorPoint={new Vector2(0.5, 1)} AnchorPoint={new Vector2(0.5, 1)}