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 handleActivated = () => {
if (tool.Parent !== clientState.character) {
clientState.character.Humanoid.EquipTool(tool)
} else {
clientState.character.Humanoid.UnequipTools()
}
tool.Parent !== clientState.character
? clientState.character.Humanoid.EquipTool(tool)
: clientState.character.Humanoid.UnequipTools()
}
// maybe opt this into our system for inputs?

View file

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