Basically I sent the remote event and I know thats working, is there anything wrong in this script??
debounce = false
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local GuiClicker = ReplicatedStorage:WaitForChild("GuiClicker")
local playerGui = player:WaitForChild("PlayerGui")
local function OnGuiClickerFired(plr)
if debounce == false then
plr.playerGui.InfoPanel.ScrollingFrame:TweenPosition(UDim2.new(0.5, -250,0.5, -200, 'Out', 'Bounce', 1))
debounce = true
else
plr.playerGui.InfoPanel.ScrollingFrame:TweenPosition(UDim2.new(-0.5, -250,0.5, -200, 'Out', 'Bounce', 1))
debounce = false
plr.playerGui.InfoPanel.ScrollingFrame.Visible = true
debounce = false
end
end
GuiClicker.OnClientEvent:Connect(OnGuiClickerFired)

1 comment
Why are you defining plr in line 10 when you did this on line 5?