Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why Is this script skipping the tp for the puck?

I asked someone and told it was tabbing but I can't figure it out.

Code:


--FO SYSTEM--

local Puck = workspace.Puck
local Whistle = workspace.GameSounds.Whistle
local hitbox = game.ReplicatedStorage.FoValues.Hitbox2

function onTouched(hit) 
if hit.Name == "Puck" then
			print("touched")
	if hit.Name == "Puck" then 
		print("hit")	  
	Puck.Anchored = true
	print("anchored")
	if hitbox == true then
	Puck.Position = Vector3.new(-29.62, 8.959, 364.466)
	print("tpd")
	else if hitbox == false then
	Puck.Position = Vector3.new(-29.62, 8.959, 364.46)
	print("tpd")
end
    Whistle:Play()
print("whistled")
end 
end 
end
end

script.Parent.Touched:connect(onTouched)

3 comments

0

Are there any errors?

0

no

0

if hitbox.Value == true/false

1 answer

local Puck = workspace.Puck
local Whistle = workspace.GameSounds.Whistle
local hitbox = game.ReplicatedStorage.FoValues.Hitbox2

function onTouched(hit)
	if hit.Name == "Puck" then
		Puck.Anchored = true
		Puck.Position = Vector3.new(-29.62,8.959,364.466)
		Whistle:Play()
	end
end

script.Parent.Touched:Connect(onTouched)

1 comment

0

that would work but its not how its suppose to be

This discussion is preserved as it was. New answers, comments, and votes are closed.