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

How do I make a script Client side?

Asked by 4 years ago

So, what I tried to do is make a script Client side, I put it as local script but my script uses a Proximity function which only allows a script to do the job.

However, I tried to make a oven but when its done cooking it'll dialog that its done, meaning that anyone could pick it up

I need only one player to do this function and claim they're own pizza.

Code:

local ProximityPromt = script.Parent.ProximityPrompt
--- Pizza Models
local Pizza1 = game.Workspace.Pizza1
local Pizza2 = game.Workspace.Pizza2
local Pizza3 = game.Workspace.Pizza3
local Pizza4 = game.Workspace.Pizza4


ProximityPromt.Triggered:Connect(function()
    if ProximityPromt.ActionText == "Cook" then
        Pizza1.Transparency = 0
        ProximityPromt.ActionText = "Please Wait Till The Player's Cooking is done."
        wait(15)
        ProximityPromt.Enabled = true
        ProximityPromt.ActionText = "Pick Up"
        Pizza1.Transparency = 1
        wait(2)
        if ProximityPromt.ActionText == "Cook" then
            Pizza1.Transparency = 0
        end

    end
end)

1 answer

Log in to vote
0
Answered by
sebanuevo 123
4 years ago
Edited 4 years ago

Maybe just fire a remote event throught the server script to the client, you can do this by:

RemoteEvent:FireClient(Player)

And then you pick up the remotevent on the client, with maybe a local script on startergui with:

RemoteEvent.OnClientEvent

0
It isnt a server script, its a normal script in a part usmaniusmangamer15 9 — 4y
0
normal scripts are server scripts sebanuevo 123 — 4y
Ad

Answer this question