Crossbow bolt launches players across map

thought id use the crossbow gear for my side project, somehow if the bolt comes into contact with a player, and that player moves the player is flung to a random location.

what could i do to prevent this? i think the main cause is that the crossbow can’t get stuck, so it just moves the player in the direction its flying in but i’m not sure, i’m not an expert scripter.

robloxapp-20240212-1809303.wmv (1.3 MB)

1 Like

couldn’t you upload the video to .mp3 format?
yeah, you have to download the vid to watch it since devforum doesnt support .vmw :neutral_face:

You mean if you shoot a player and push it then the player gets flinged?
Yeah you should check crossbow script if there’s something wrong with it.
(or wait until someone checks it if you dont know scripting)

If possible, you can also post this in #bug-reports (note that not everyone can)

1 Like

tried changing the can collide off in both the part and the script, doesn’t seem to work.

is there any ‘Body’ instance on the player after you shoot him? e.g. BodyVelocity, BodyGyro, etc. The movement reminds me of those deprecated object classes.

how do i check that? tried output but there seems to be nothing

1 Like

check if the scripts contain Instance.new() creating the instance type i mentioned earlier.
(it doesnt appear on output)

1 Like
local force = Instance.new("BodyForce")
force.force = Vector3.new(0, 90, 0)
force.Parent = bolt

local BodyGyro = Instance.new("BodyGyro")
BodyGyro.maxTorque = Vector3.new(math.huge,  math.huge, math.huge)
BodyGyro.cframe = bolt.CFrame
BodyGyro.Parent = bolt
1 Like

Yeah, these may be for moving the player when shot, Those two instance types are deprecated so you should replace them with an alternative like applying an impulse to a part.

1 Like

If you don’t want the player to be moved you can just delete those lines.

You could also change the Vector3.new values to a lower value (try using 0, 10, 0 instead of 0, 90, 0)

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.