Answered by
4 years ago Edited 4 years ago
As far as I can tell from testing your code and my own, one good way of going about this is through the use of RemoteEvents. First we will be creating a Remote Event and putting it in Replicated Storage. Then it is as simple as firing this event from a server script,(the location does not matter as long as the server script knows what you mean by proximity prompt)and creating a local script wherever it works(starterplayer, workspace, etc) and making the frame visible from there
3 | local rs = game:GetService( "ReplicatedStorage" ) |
4 | local ppEvent = rs:WaitForChild( "PPEvent" ) |
6 | script.Parent.Triggered:Connect( function () |
7 | ppEvent:FireAllClients() |
03 | local rs = game:GetService( "ReplicatedStorage" ) |
04 | local ppEvent = rs:WaitForChild( "PPEvent" ) |
05 | local players = game:GetService( "Players" ) |
06 | local player = players.LocalPlayer |
07 | local shopGui = player.PlayerGui:WaitForChild( "Shop" ) |
08 | local frame = shopGui:WaitForChild( "Frame" ) |
10 | ppEvent.OnClientEvent:Connect( function () |
Be sure to accept this as your answer if it, is the correct solution of course.