Hey so I’m making a laser gun and the functional part of the gun is working, but I’m trying to make an effect for the gun, and even though I’m using the same coordinates for the effect as I am with the gun, it’s going in a totally different place that I don’t understand the relation for.
This is the functional part:
local direction = (mouse.Hit.p - tool.Tip.Position).Unit
local ray1 = workspace:Raycast(tool.Tip.Position,direction*100)
Remember the direction times 100. In a later part of the script, I send the direction over a RemoteEvent.
--Local script
laserEvent:FireServer(w1,w2,w3,direction)
--Server script
a1Part.Position = direction*100
The resulting position of the part is way over at the red house. I’m really stuck on this, anybody know why? Sorry, it’s sort of hard to see in the video.
I’m also attaching the whole server and local script if there are details I failed to include.
LaserServer.txt (1.6 KB) LaserLocal.txt (1.8 KB)
Thank you in advance!