Hello, Gigachads of scriptinghelpers.org
I am attempting to print the position(only the X for now) of the 'handle' in my tool.
My use for this is to create a extremely simple gun, but that is not important, just a little backstory.
local tool = script.Parent tool.Activated:Connect(function() print(game.StarterPack.Gun.Handle.Position.X) end)
Output: 66
I am unsure as to why this is happening, but some clarification on what I have messed up on would be much appreciated; along with some of my fixed code(if possible).
Thanks in advance Gigachads,
IsaacFriend808
66 is the position of the handle (x)
The starter pack contains the tools that you start with when you join the game, it's like starterGui. So you'll have to print the actual handle by writing this instead
local tool = script.Parent local handle = tool.Handle -- Make that wherever the handle is in the tool. tool.Activated:Connect(function() print(handle.Position.X) -- Of course you could put more prints in, printing the Y or Z or all of it (XYZ) end)
I hope that was what you needed