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

I need help with a script to disable tools, chat etc? [closed]

Asked by 4 years ago
Edited 4 years ago

I am making a system with a seat where if a player sits on the seat it disables his jump and such until a button is pressed. I've sorted that all out but I am stuck on the part to disable their toolbar, chatbar and reset button. When I mean disable I mean hide the option of the toolbar and chatbar so it is invisible so not a loop of unequiping it. I am unsure how I can get about this. The script is located in the chair.

seat = script.Parent
local MainModel = script.Parent.Parent

function added(child)
    if (child.className=="Weld") then
        human = child.part1.Parent:FindFirstChild("Humanoid")
        local mainPlayer = human.Parent
        local plr = game.Players:FindFirstChild(mainPlayer.Name)
        if human ~= nil then
            anim = human:LoadAnimation(seat.sitanim)
            anim:Play()
        end
     end
end

function removed(child2)
    if anim ~= nil then
        anim:Stop()
        anim:Remove()
    end
end

seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)

UPDATE: Since someone got the impression I am asking someone to make me a new script I have included some parts of my script which some I have removed due to the fact that I don't want to leak it all. If anyone is able to help tell me how I could add these features into this it'd be greatly appreciated

0
Please don't ask for people to make or help you make scripts. This is NOT a request site. If you have a script already please include it in the post. ghxstlvty 133 — 4y
0
If you understood the question I am not in need of someone to make a script. I am looking for functions or ways I could go about this. I already made a script for it which includes things that would not help with doing this. I am not looking at leaking the system I am working on. But if it helps you know that I am not asking for a complete script then I hope the updated question helps you. kyloren528 11 — 4y

Closed as Not Constructive by WideSteal321, IAmNotTheReal_MePipe, botw_legend, Cynical_Innovation, and PrismaticFruits

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?