I Was Editing The Roblox Bloxy Cola And I Could Not UnderStand Why This Wont Work.

local Tool = script.Parent;

enabled = true

f = Game.Lighting.FadeScreen2Hours

function onActivated()
	if not enabled  then
		return
	end

	enabled = false
	Tool.GripForward = Vector3.new(0,-.759,-.651)
	Tool.GripPos = Vector3.new(1.5,-.5,.3)
	Tool.GripRight = Vector3.new(1,0,0)
	Tool.GripUp = Vector3.new(0,.651,-.759)


	Tool.Handle.DrinkSound:Play()

	wait(3)
	
	local h = Tool.Parent:FindFirstChild("Humanoid")
	if (h ~= nil) then
		f.Parent = Game.Players.LocalPlayer.PlayerGui
			  	end
	end

	Tool.GripForward = Vector3.new(-.976,0,-0.217)
	Tool.GripPos = Vector3.new(0.03,0,0)
	Tool.GripRight = Vector3.new(.217,0,-.976)
	Tool.GripUp = Vector3.new(0,1,0)

	enabled = true


function onEquipped()
	Tool.Handle.OpenSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

2 comments

0

Move the end on line 26 to 35 maybe.

0

If that fails, could you post the error; In Studio go to Window > Output. In Live Press F9 or go to Menu > Help > Log > Local Console for Local script or Server Console for Serverside script.