VXT_Dec
(VXT_Dev)
#1
Hello developers,
I’m currently working on FPS framework. When I click my mouse the bullet does not teleport to the gun
It just decides to teleport in random places
Here’s some of the code
This here is some of the code for the bullet teleporting to the gun. (USED IN A MODULESCRIPT)
1 Like
can’t you just make it server sidded so both the client and other can see it? and i am pretty sure you don’t teleport something to workspace.camera
VXT_Dec
(VXT_Dev)
#3
Hm, I suppose I can make a variable when calling the function.
or make an remote event, getting making a bullet and transporting it
VXT_Dec
(VXT_Dev)
#6
CW2 = CurrentWeapon right now.
also if you are storing the gun inside the workspace.camera(which is what you are doing)…that is prob a mistake if you wanna store something
VXT_Dec
(VXT_Dev)
#8
No. The gun is currently in ReplicatedStorage
![image](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/4X/5/2/f/52f3925413769c772288d19157a55b343f64e0de.png)
what is the bullet.cframe going then? it says its going to a gun that is in the workspace.camera…i need more context
VXT_Dec
(VXT_Dev)
#11
I’m still currently having the same problem. I’ll try a remote event, but I doubt it’ll work
and is that in a localscript or a server script
VXT_Dec
(VXT_Dev)
#13
The script I’m using is a localscript placed in StarterCharacterScripts
VXT_Dec
(VXT_Dev)
#15
Already did that. It just did the same thing.
VXT_Dec
(VXT_Dev)
#17
Dude, the vector3 is just an offset. if I remove the Vector3 it’ll just keep doing the same thing
Nooo i mean something like this:
bullet.cframe = cframe.new(pistol.position) + vecter3.new(1,1,1)
learned it from here https://developer.roblox.com/en-us/articles/Understanding-CFrame
VXT_Dec
(VXT_Dev)
#20
Oh, this works a little bit.
That should fix the problem.
Thank you.
1 Like