So. I am using RemoteEvents and i can't seem why it dosen't work to do like i have right now. So i will access the PlayerGui with the RemoteEvent im using. but why dosent this work to acces the playergui. i am using the RemoteEvents correctly i think.

http://imgur.com/a/9AVRR

Here's the current script.

local debounce = false
local Event = game.ReplicatedStorage.RemoteEvent

function Shop(hit) 
    if not debounce then
        if hit.Parent:FindFirstChild("Humanoid") then
			Event.OnServerEvent:connect(function(client)
				if script.Parent.Job.JobActive == false then
					print("hi")
            		local clone = game.ServerStorage.JobGuis:FindFirstChild("CableMan"):Clone()
            		clone.Parent = game.Players:FindFirstChild(hit.Parent.Name).PlayerGui
            		debounce = true
            		wait(5)
            		debounce = false
				end
			end)
        end
	end
end

 
script.Parent.Touched:connect(Shop)

Here's the current errors i am getting.

20:42:25.537 - Job is not a valid member of Part
20:42:25.538 - Stack Begin
20:42:25.539 - Script 'Workspace.Jobs.CableMan.Script', Line 8

2 comments

0

Why are you still posting this, i already answered your question...

0

No, i mean like yes, but i wanted it to be if isJobActive == true then if i touch the brick then the you already have a job gui will pop up and if it is set to false then the job gui will pop up.