#How do i reference a tool from server script

1 messages · Page 1 of 1 (latest)

tulip rivet
#

im trying to make a raycast in a server side script which needs the barrel from a gun to well, do the the raycasting

however, for whatever reason the tool instance disappears server-side

i also need the instance itself because i need the raycast to ignore the gun

tulip rivet
#

ok i only just realised that raycast in fact works in localscript

#

yes, that means the gun works now

#

however i want to keep this up to see if theres a way to access an equipped tool in a server script

#

because in server side, the tool that is normally stored in the character is just GONE

limber oracle
#

There are two ways

#

One common method is to store the tool controller server script inside the tool

#

then you can just do

local tool = script.Parent