this has really been pissing me off ive tried to get this stupid thing to work for an hour and i dont know why it wont. Ive tried like everything and nothing works.
if anyone knows why please tell me whats wrong with it
script.Parent.Touched:Connect(function(hit)
local player = hit.Parent
local playerp = game.Players:FindFirstChild(player.Name)
if playerp then
if playerp == script.Parent.Owner.Value then
game:GetService("ReplicatedStorage").RemoteEvents.Workplace1JobEvent:FireClient(player)
else
print"player does not own"
end
else
print"no player found"
end
end)
script.Parent.TouchEnded:Connect(function(hit)
local player = hit.Parent
local playerp = hit.Parent:FindFirstChild("Humanoid")
if playerp then
print(player)
if player.Name == script.Parent.Owner.Value then
game:GetService("ReplicatedStorage").RemoteEvents.Workplace1JobEvent.End:FireClient(player)
else
print"player does not own"
end
else
print"no player found"
end
end)

4 comments
dude your variable names are confusing change em u should young one and if my answer helped u on ur datastore question please accept it
Also did you mean to spell Workplace or Workspace after RemoteEvents?
You can also use :GetPlayerFromCharacter(). Also, you do have to tell us what it's printing, and set a print up on the client side for the event listener
i could accept the answer but the problem it didnt really change anything it still errors