Beam Tween size bugging out

Hey there! I am making an SCP game and I am attempting to recreate the SCP: Roleplay ProximityPrompt for a placeholder (I will 100% change up the style and everything about the ProximityPrompt in the future).

Could anyone tell me how I can fix this little Tween bug? Basically whenever I get close to the prompt, the beam size tweens to 0.05, when I back up from the prompt, the beam size tweens to 0 but if I were to do the same thing but at a fast pace, the beams size will glitch out.

I believe I know the problem to this, I just do not know how to solve it. Any suggestions?

External Media
onHiddenBeam:Play()
			
task.wait(0.5)
			
Beam.Attachment1 = nil
1 Like

use :Cancel() when you enter that radius so the tween stops and can reset back to what it should be, before :Play()

It’s not the Tween that’s messing up the whole thing, it’s because I have a task.wait(0.5) and after that task.wait it sets the beam’s Attachment1 to nil

well what im seeing here in the video is that youre going back into that radius during the size decrease on the tween or that task.wait(0.5) so you should utilize .Completed or tween methods/properties to handle timing especially for those quick and erratic movements

Hmm, well I just quickly made a little fix but I’m not sure if its efficient.

if prompt.PromptShown then
	print("shown prompt so no L")
else
	Beam.Attachment1 = nil
end
1 Like

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