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

Cilentside Scripts needed to be visible on Server?

Asked by
Aozwel 71
4 years ago
Edited 4 years ago

Hey there, new scripter here,

I've created GUI pop up Guis to appear OnTouched to a Part, However i want it to be Visible to the whole server when 1 Player triggers it,

As of now its just Visible for whoever touches it.

Is that an easy change?

local book1 = script.Parent
debounce=true
script.Parent.Touched:Connect(function(hit)
    if debounce == true then
        debounce = false 
    if game.Players:GetPlayerFromCharacter(hit.Parent) then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)

        game.ReplicatedStorage.bookCollected:FireClient(player)
        book1:Destroy()
        wait(5)
        debounce = true


    end 
        end
            end)

Thanks,

0
hmmm lon233bcc 31 — 4y
0
Seems like what im looking for, I just replace it to this?, game.ReplicatedStorage.stuffCollected.OnClientEvent.FireAllClients:Connect(function() Aozwel 71 — 4y
0
I love the `if debounce == true then`. It's as if debounce isn't a boolean that can be checked already... User#26971 0 — 4y
0
Got it fellas :thumbs_up: Thanks again Aozwel 71 — 4y

Answer this question