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

Where do i need to put this end i'm soo confused??

Output:

Players.Freddan2006YT.PlayerGui.zxcxzx.Trolling_UI.Rocket.LocalScript:14: 'end' expected (to close 'function' at line 8) near 'else'

code:

local button = script.Parent
local plrname = script.Parent.Parent.Parent.Trolling_UI.PlrName.Text
local rem = game.ReplicatedStorage.Admin:WaitForChild("Rocket")
local status =script.Parent.Parent.Parent.Trolling_UI.status
	print(plrname)
if workspace:FindFirstChild(plrname) then
button.MouseButton1Click:Connect(function()
	status.Visible = true
	status.Text = "Sending Request.."
	wait(0.8)
	status.Visible = false
	status.Text = "Succsess!"
else
	status.Visible = true
	status.Text = "Not a valid plr"
	status.Visible = false
end)
end

1 answer

chief you got it mixed up

local button = script.Parent
local plrname = script.Parent.Parent.Parent.Trolling_UI.PlrName.Text
local rem = game.ReplicatedStorage.Admin:WaitForChild("Rocket")
local status =script.Parent.Parent.Parent.Trolling_UI.status

button.MouseButton1Click:Connect(function()
    if workspace:FindFirstChild(plrname) then
    status.Visible = true
    status.Text = "Sending Request.."
    wait(0.8)
    status.Visible = false
    status.Text = "Succsess!"
else
    status.Visible = true
    status.Text = "Not a valid plr"
    status.Visible = false
end
end)

4 comments

0

Oh..god i will never learn. And also thanks ??

0

Oh..god i will never learn. And also thanks!

0

Oh..god i will never learn. And also thanks!

0

Oh..god i will never learn. And also thanks!

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