Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 4 years ago

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

Log in to vote
1
Answered by
Robin5D 186
4 years ago

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)

0
Oh..god i will never learn. And also thanks ?? Freddan2006YT 88 — 4y
0
Oh..god i will never learn. And also thanks! Freddan2006YT 88 — 4y
0
Oh..god i will never learn. And also thanks! Freddan2006YT 88 — 4y
0
Oh..god i will never learn. And also thanks! Freddan2006YT 88 — 4y
Ad

Answer this question