Issue with local script and ProximityPrompts

Hey everyone! I was trying to make an object inspection script like the one in Resident Evil 7 and 8 and I wanted it to be activated by a proximityprompt attached to the object. Firstly I wanted to make it so that when the proximityprompt is triggered, the bluriness increases and an image and some text appear. The issue I faced is that proximityprompts only work on normal scripts and if i were to alter bluriness in a normal script it would change the bluriness for everyone and I didn’t want that. I tried making a script that fires a remoteevent and another local script that changes the bluriness when the event is fired but nothing happens.

Script

local remoteEvent = game.ReplicatedStorage:WaitForChild("RemoteName")
local ProximityPrompt = script.Parent

ProximityPrompt.Triggered:Connect(function(player)
	remoteEvent:FireClient(player)
end)

LocalScript

local remoteEvent = game.ReplicatedStorage:WaitForChild("RemoteName")
local Blur = game.Lighting.Blur

remoteEvent.OnclientEvent:Connect(function()
	for i = 0,24,1 do
		Blur.Size = i 
		wait(0.05)
	end
end)

image
image

It’s OnClientEvent, not OnclientEvent

It still doesn’t work for some reason

Does the localscript get re-parented underneath Workspace? (I’m assuming it does); If so, try putting it underneath somewhere like ReplicatedFirst:

image

The local script’s parent was a part, i;ll move into replicated first and i’ll tell you if it worked

It worked! tysm for your help!!

1 Like