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

How do I make a script Client side?

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

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