Unable to cast value to Object

Client

script.Parent.MouseButton1Down:Connect(function(hit)
	if script.Parent.Parent.Team.Value == "nil" or script.Parent.Parent.Team.Value == nil then
		local txt = script.Parent.Text
		script.Parent.Text = "Select Team to Call"
		wait(2)
		script.Parent.Text = txt
	else
		local message = script.Parent.Parent.MessageT
		local location = script.Parent.Parent.LocationT
		if script.Parent.Parent.Team.Value == "DOT" then
			game.ReplicatedStorage.DOTCall:FireClient(message.Text,location.Text)
		end
	end
end)

Line 11

game.ReplicatedStorage.DOTCall:FireClient(message.Text,location.Text)

Since you said that the script is client, aren’t you supposed to use :FireServer()?

1 Like

wait this script is supposed to be client hold on

ok i made it client and edited it it works now

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.