I've been trying to fix this for the past hour and for some reason it doesn't seem to work.... I'm literally going to jump off a bridge rn...

It's a script in a part

script.Parent.Touched:Connect(function(Object)
	print("check")
	if Object.Parent:FindFirstChild("Humanoid") then
		local player = game:GetService("Players"):GetPlayerFromCharacter(Object.Parent)
		local Team = script.Parent.Name
		game.ReplicatedStorage.JoinTeam:FireClient(player)
		print("wait")
	end
end)

I get the check and the wait so it definitely has something to do with the fireclient

if I run a localscript in startgui with this code it works so I'm completely baffled...

local players = game.Players.LocalPlayer
game.ReplicatedStorage.JoinTeam:FireServer(players)

4 comments

0

whats the LocalScript? Also, make sure you check if player is an object, and not nil by doing if player then

0

Its not a localscript

0

is the event remote or bindable?

0

Its a RemoteEvent in Replicated Service